1. No I don't. I tried to use them, but failed to see how they can make my life easier, and code cleaner and more reliable, comparing to using die. When I'm using eval I usually just want to know if code succeed or failed, I can't remember right now any case where I wanted to perform different actions based on the $@ content. Some of my colleagues are actively using Exception::Class and, from my point of view, it doesn't make their code better. I just hate to see statements like:

do_something or MyCompany::Product::Subsystem::Module::Exceptions::IOE +rror->throw("Couldn't open $file: $!");

2. If I will learn how to use exception objects to improve my code quality I will immediately start to use them.

4. Yes, I think generally it is a bad idea. Redefining $SIG{__DIE__} may cause some hard to debug problems.


In reply to Re: Do you use an exception class in your Perl programs? Why or why not? by zwon
in thread Do you use an exception class in your Perl programs? Why or why not? by TGI

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.