[nlug] Re: Perl Common Error Handling Subroutine

2014-03-14 Thread Brian J. Miller
Is the "lot of extra stuff" the stack trace? If it is, then don't use `confess` use `croak` or `die`. `confess` is giving you a stack trace. -- -- You received this message because you are subscribed to the Google Groups "NLUG" group. To post to this group, send email to nlug-talk@googlegroups

Re: [nlug] Re: Perl Common Error Handling Subroutine

2014-03-14 Thread Csaba Toth
It wasn't clear to me if you want to display call stack and detailed error information or not. Usually you don't want detailed information for a user, just a simple error message to avoid confusion and to not help certain hack attempts (an attacker gain information on the internals of your app). I

Re: [nlug] Re: Perl Common Error Handling Subroutine

2014-03-14 Thread Paul Boniol
Yes, in part what I'm saying is I need to do more advanced error handling. croak and die don't give the calling line number. Page security is already taken care of. The script in question accepts a student ID (told by the student to an office worker) and prints a contract on the office printer f

Re: [nlug] Re: Perl Common Error Handling Subroutine

2014-03-15 Thread Paul Boniol
Everything is now working great with the Perl script! Lots of new code, but it is emailing me errors (other than manually entered ID not found), and doesn't display anything to the user other than my error message thanks to: use File::Spec; and right before calling confess doing open STDERR, '>'