Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

It'd be really nice if one of the dozen exception modules got included in the core (besides the very old exceptions.pl, that is). I say this because one of the nice things about exceptions in other languages is that they interoperate.

I have no idea whether any of the many exception modules can deal with each others' exceptions, and that has been a big reason why I haven't invested the time in any of them.

Update based on John M. Dlugosz's reply: Yeah, that is all I am talking about. I suspect that one or more of those modules is well written enough that it can deal with exceptions from other modules intelligently. Perl gives us eval and die, but we need a common idiom for catch() that works with all reasonable exception modules. I'd base such a catch() around UNIVERSAL::isa() but with support for substring/regex matches on error text (since not all uses of die are going to be throwing objects).

I think there is plenty of room for more than one way of writing catch(), etc. But we need an example in the core that sets a de facto standard for interoperability among them.

        - tye (but my friends call me "Tye")

In reply to (tye)Re2: Throwing Exceptions and Error Handling by tye
in thread Throwing Exceptions and Error Handling by John M. Dlugosz

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-16 21:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found