RE: Trapping errors

2006-05-10 Thread Timothy Johnson
Do something like this: ### Win32::OLE->Option(Warn => \&Error_Handler); sub Error_Handler{ print "WARN!!! ".Win32::OLE->LastError."\n"; } ## -Original Message- From: Gallagher, Tim (NE) [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 10, 2006 11:20 AM To: Perl Beg

Re: trapping errors in "use"

2003-01-20 Thread Jeff 'japhy' Pinyan
On Jan 21, Victor Tsang said: >$mod = "CGI"; >unless (eval "use $mod") > { >warn "unable to install $mod $@\n"; > } > } Change your eval() to eval "use $mod; 1;" which forces a true value to be returned if 'use' runs successfully. -- Jeff "japhy" Pinyan [EMAI

Re: trapping errors in "use"

2003-01-20 Thread simran
from 'perldoc -f use' use Module (); That is exactly equivalent to BEGIN { require Module } me thinks, what you want is > #!/usr/bin/perl > BEG

Re: Trapping errors from SQL

2002-01-30 Thread Michael Fowler
On Wed, Jan 30, 2002 at 07:37:55PM +, Jonathan E. Paton wrote: > You need to look into the configuration then, since my > logfile > is punctuated with timestamps in the following way: > > [Fri Jan 4 12:15:54 2002] [error] [client 192.168.100.1] > File does not exist: > /usr/local/httpd/htdoc

Re: Trapping errors from SQL

2002-01-30 Thread Scott Taylor
At 11:30 AM 01/30/02, Jason Purdy wrote: >You may also be interested in checking out the RaiseError attribute of any >DBI handle... > >$dsn = 'DBI:mysql:dbname'; # not sure what this looks like for InterBase >$dbh = DBI->connect( $dsn, 'username', 'password' ); >$dbh->{RaiseError} = 1; Thank

Re: Trapping errors from SQL

2002-01-30 Thread Jonathan E. Paton
| > Surely you have the script name and timestamp next to that? | > | | Nope, that's the entire message. | Shame, you have some details but nothing leading to the problem without knowing which script... of many. | > If not, upgrade your httpd to something this side of 1900. | > ;) | | The http

Re: Trapping errors from SQL

2002-01-30 Thread Jason Purdy
You may also be interested in checking out the RaiseError attribute of any DBI handle... $dsn = 'DBI:mysql:dbname'; # not sure what this looks like for InterBase $dbh = DBI->connect( $dsn, 'username', 'password' ); $dbh->{RaiseError} = 1; Jason If memory serves me right, on Wednesday 30 J

Re: Trapping errors from SQL

2002-01-30 Thread Jonathan E. Paton
> Does anyone know how I can trap this error? It's in my > "/var/log/httpd/error_log" file once in a while. > > DBD::InterBase::st execute failed: Overflow occurred > during data type > conversion. > -conversion error from string "" > DBD::InterBase::st fetchrow failed: Unknown cursor > -Dynam