Dear brothers and systers!

Preface

I've read a node Learning how to use the Error module by example. There was hot discussion about using try/catch block. I can't give you any examples of situations when I had some problems with it. But I can tell you that using of try/catch helps me appreciably. Because I develop a big project on Perl - billing system and I have Perl classes and Embperl scripts and I need catch exceptions, do some actions for saving of normal running of application and display to user some friendly message.

Question

I'd like to know your opinion about catch exception in big projects on Perl. Of course, I know about eval and %SIG, but is it good and only one solution?

Thanks in advanced.

_ _ _ _ _ _
  M i c h a e l

Replies are listed 'Best First'.
Re: Catch exception
by adrianh (Chancellor) on Jul 31, 2003 at 08:13 UTC
      Many thanks, adrianh. It's really useful node!

      _ _ _ _ _ _
        M i c h a e l

Re: Catch exception
by perrin (Chancellor) on Jul 31, 2003 at 14:41 UTC
    Don't use the try/catch syntax unless you and everyone else on the project fully understands the problems it can cause with closures and return values and are prepared to spend some time testing to be sure your application doesn't have those problems.
Re: Catch exception
by mildside (Friar) on Aug 01, 2003 at 00:42 UTC
    Shouldn't this node be in the SoPW section?

    Cheers!