Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( #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? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2023-02-06 07:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (33 votes). Check out past polls.

    Notices?