Ask a Question related to PERL Beginners, Design and Development.
-
Hari Fajri #1
Handling error with exception
Do perl have handling error (exception) mechanism?
for example: java use : try{...} catch{...}
Thanks
Hari Fajri Guest
-
Global Exception Handling
Exceptions thrown by an XML Web service method created using ASP.NET are sent back to the client in the form of a SOAP fault. A SOAP fault is a... -
PHP5 and exception handling
Hello, I'm used to exception handling in C++ or Delphi/Object Pascal and I had lotsa expectations for PHP5 exception handling, especially since I... -
SoapExtension for Global Exception handling; but prevent exception from propagating!!
Hi, I wrote a SoapExtension for Global Exception handling in Webservice and it works!!!! Now i want to catch the exception that happen in the... -
Exception Handling.
Hi, Considering the scenario for handling exceptions in Web Application where we have Presentation layer, Business layer and Data Access layer; if... -
Exception handling problem
I override protected void Application_Error(Object sender, EventArgs e) I have code that will read the last Exception message and redirect to a... -
Randy W. Sims #2
Re: Handling error with exception
On 2/12/2004 9:56 PM, Hari Fajri wrote:
perl has pretty poor build-in exception handling which consists of> Do perl have handling error (exception) mechanism?
>
> for example: java use : try{...} catch{...}
executing some code in an eval{...} block and then check $@ to see if an
error occured. There are a couple of good modules that provide a very
nice wrapper around the built-in mechanism. Probably the best is 'Error'
which adds 'try', 'catch', and 'except' blocks. There are also
Exception::Class, Exception and a bunch of others
<http://search.cpan.org/search?query=exception>.
Regards,
Randy.
Randy W. Sims Guest
-
Jenda Krynicky #3
Re: Handling error with exception
From: "Randy W. Sims" <RandyS@ThePierianSpring.org>
I don't think "poor" is the right word. Simple or low-level would fit> On 2/12/2004 9:56 PM, Hari Fajri wrote:
>>> > Do perl have handling error (exception) mechanism?
> >
> > for example: java use : try{...} catch{...}
> perl has pretty poor build-in exception handling
better. IMHO.
Considering the fact that $@ doesn't have to be a string, but it can> which consists of
> executing some code in an eval{...} block and then check $@ to see if
> an error occured.
be an object it's actually rather powerfull. But you do not have a
lot of syntax sugar around that by default.
Yep, in Perl you can choose your sweets :-)> There are a couple of good modules that provide a
> very nice wrapper around the built-in mechanism. Probably the best is
> 'Error' which adds 'try', 'catch', and 'except' blocks. There are also
> Exception::Class, Exception and a bunch of others
> <http://search.cpan.org/search?query=exception>.
Jenda
===== [email]Jenda@Krynicky.cz[/email] === [url]http://Jenda.Krynicky.cz[/url] =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
Jenda Krynicky Guest



Reply With Quote

