Hi, sounds like you may not be familiar with how CGI tends to work from Perl.  
Basically, you _have_ to send output to the browser.
So you need to have your subroutine return something to send something to the browser 
(warn() will not automatically do this for
you).  So your function ought to look more like:

unless ( $object->do_yourself() ) {
  warn "CRITICAL: Error, object can not do itself!\n";
  return 'Hello user, there was an error. Please contact [EMAIL PROTECTED]';
}


-----Original Message-----
From: Odounga y'Oyabi [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 17, 2001 07:46 AM
To: [EMAIL PROTECTED]
Subject: [cgiapp] Error Handling with CGI::Application


Hi!

I'm a Perl novice and currently trying to develop a CGI::Application based
web-system.

I can't figure out how to display an error page to the user when an
exception occurred in a sub called by a run-mode.

In the sub I'm doing a conditional like this

unless ( $object->do_yourself() ) {
  warn "CRITICAL: Error, object can not do itself!\n";
  return;
}

I'm looking for a mechanism for returning this error message to the browser.
Currently, it just warn "Document contains no data" and didn't update the
screen.

Thanks for your support and invaluable time.

Regards,

Roses Longin Odounga

Falltorweg 4
D-65428 R�sselsheim
Tel. +49 (0) 6142 - 938978
GSM  +49 (0) 173  - 3201063
Mailto [EMAIL PROTECTED]
http://www.gabon-net.com


_________________________________________________________________
Downloaden Sie MSN Explorer kostenlos unter http://explorer.msn.de/intl.asp


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to