SPUG: generating output with a cgi script

Richard Anderson starfire at zipcon.net
Mon Oct 2 21:31:17 CDT 2000


Wu, Yaoxi wrote:
> Following one of suggestions, I wrote a function to display the error
> message on the web browser (a simple "die ..." statement would cause the
> server to display something like "an internal error ..." which was not
very
> helpful),

Better than writing a custom error handler is simply adding:
   use CGI::Carp 'fatalsToBrowser';
to your CGI script and calling die in the normal manner.

Richard.Anderson at raycosoft.com
www.zipcon.net/~starfire/home (personal)
www.raycosoft.com (corporate)


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list