Catching Errors

B

-Brad-

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
 
G

Gunnar Hjalmarsson

-Brad- said:
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.
 
B

-Brad-

Ahh ok thanks for the reply!
Maybe I should make sure I have the latest version of the CGI module
installed.

Cheers

-Brad- said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top