Catching Errors

Discussion in 'Perl Misc' started by -Brad-, Dec 12, 2003.

  1. -Brad-

    -Brad- Guest

    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
     
    -Brad-, Dec 12, 2003
    #1
    1. Advertising

  2. -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
     
    Gunnar Hjalmarsson, Dec 12, 2003
    #2
    1. Advertising

  3. -Brad-

    -Brad- Guest

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

    Cheers

    "Gunnar Hjalmarsson" <> wrote in message
    news:brb4i9$1funq$-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
     
    -Brad-, Dec 12, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mikael Engdahl

    Catching ASP.NET errors

    Mikael Engdahl, Aug 15, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    2,387
    S. Justin Gengo
    Aug 15, 2003
  2. TonyG

    Catching Framework Errors

    TonyG, Aug 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    327
    MS News \(MS ILM\)
    Aug 26, 2003
  3. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    993
    Mark Goldin
    Jan 17, 2004
  4. darrel
    Replies:
    0
    Views:
    321
    darrel
    Sep 28, 2005
  5. yawnmoth
    Replies:
    97
    Views:
    4,763
    Bent C Dalager
    Feb 27, 2009
Loading...

Share This Page