Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Catching Errors

Reply
Thread Tools

Catching Errors

 
 
-Brad-
Guest
Posts: n/a
 
      12-12-2003
Insted of display Server error Id like to display something meaningful that
will assist me in debuging the problem without having to look at the server
error log.
If i use Carp qw(fatalsToBrowser)
It helps a little, but is there a way I can display similar to what would be
seen in the error_log,
eg
Missing right curly bracket at line 20.

Thanks


 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      12-12-2003
-Brad- wrote:
> Insted of display Server error Id like to display something
> meaningful that will assist me in debuging the problem without
> having to look at the server error log.
> If i use Carp qw(fatalsToBrowser)


Suppose you mean

use CGI::Carp qw(fatalsToBrowser);

> It helps a little, but is there a way I can display similar to what
> would be seen in the error_log,
> eg Missing right curly bracket at line 20.


That is a fatal error, which should be captured by fatalsToBrowser().
Personally I have experienced significant differences in how different
versions of CGI::Carp behaves.

If it's more convenient to you, you may want to keep a 'private' error
log by using the carpout() function. See the CGI::Carp documentation
about how it works.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

 
Reply With Quote
 
 
 
 
-Brad-
Guest
Posts: n/a
 
      12-12-2003
Ahh ok thanks for the reply!
Maybe I should make sure I have the latest version of the CGI module
installed.

Cheers

"Gunnar Hjalmarsson" <(E-Mail Removed)> wrote in message
news:brb4i9$1funq$(E-Mail Removed)-berlin.de...
-Brad- wrote:
> Insted of display Server error Id like to display something
> meaningful that will assist me in debuging the problem without
> having to look at the server error log.
> If i use Carp qw(fatalsToBrowser)


Suppose you mean

use CGI::Carp qw(fatalsToBrowser);

> It helps a little, but is there a way I can display similar to what
> would be seen in the error_log,
> eg Missing right curly bracket at line 20.


That is a fatal error, which should be captured by fatalsToBrowser().
Personally I have experienced significant differences in how different
versions of CGI::Carp behaves.

If it's more convenient to you, you may want to keep a 'private' error
log by using the carpout() function. See the CGI::Carp documentation
about how it works.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why does catching errors that aren't thrown give syntax errors? yawnmoth Java 97 02-27-2009 12:07 AM
catching errors with XPathExpression darrel ASP .Net 0 09-28-2005 04:44 PM
Errors, errors, errors Mark Goldin ASP .Net 2 01-17-2004 08:05 PM
Catching Framework Errors TonyG ASP .Net 1 08-26-2003 06:52 PM
Catching ASP.NET errors Mikael Engdahl ASP .Net 3 08-15-2003 06:18 PM



Advertisments