Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^5: unless/if

by Moron (Curate)
on Oct 18, 2005 at 12:07 UTC ( #500949=note: print w/ replies, xml ) Need Help??


in reply to Re^4: unless/if
in thread unless/if

Adding the "\n" to get rid of traceback info is the least part of the problem and does not address the real situation that professional programmers will frequently encounter, requiring more to be done on encountering a fatal error that needs to be brought to user's rather than just an IT person's attention and which may need support some time after the fact.

<condition> or ProjectName::Die( $gddref, "message content" ); # in package ProjectName sub Die my $gddref = shift; # ref. to global data dictionary my $content = shift; my $UICB = $gddref -> { CB }{ UIOUT }; my $logref = $gddref -> { FH }{ LOGOUT }; &$UICB( "FATAL ERROR: $content" ); # which may or may not end up # using die depending # on the user interface print $logref ( ProjFormatTime( localtime() ) . ": $content\n"; exit 1; # having met such particular messaging requirements # die with or without "\n" is no longer an obvious idea. }
which is more to type than:<code> Die( "

-M

Free your mind


Comment on Re^5: unless/if
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://500949]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (15)
As of 2014-08-20 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (115 votes), past polls