logo       

Re: How to catch exceptions, second try...: msg#00201

web.mason.user

Subject: Re: How to catch exceptions, second try...


On Friday, August 22, 2003, at 01:18 PM, Skip Montanaro wrote:

I posted this on the 14th, but saw no responses. I'm reposting on the hunch
that everyone was distracted...

I have a Mason component which uses Frontier::Client to make an XML-RPC call
to a remote method which can raise an exception (a fault in XML-RPC
parlance). When the fault information is detected by Frontier::Client, it
obligingly calls die() with information about the error.

In my code I tried to catch the exception like so:

eval {
$result = $m->comp("/.../.../component", "remote method", a1, ...);
};
if ($@) {
blah blah blah;
}

Problem is, my code is never executed. The Mason error handler always gets
called. What am I missing?

Perhaps you just need to set error_mode to 'fatal' ?

http://www.masonhq.com/docs/manual/Params.html#error_mode

-Ken



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise