Error Messages

Error Messages

am 23.10.2003 16:18:19 von mark.r.osullivan

Hi,
Anyone know is it possible to change error messages. Say in the following
case:
my $dbh =
DBI->connect('DBI:mysql:database=waitingroomdetail;host=loca lhost',
$user, $password)
or die $DBI::errstr;

Is it possible to change this $DBI::errstr message.


************************************************************ **********
This document is strictly confidential and is intended for use by
the addressee unless otherwise indicated.
Allied Irish Banks
************************************************************ **********


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Error Messages

am 23.10.2003 17:05:48 von Jochen Wiedmann

mark o' sullivan wrote:

> Anyone know is it possible to change error messages. Say in the following
> case:
> my $dbh =
> DBI->connect('DBI:mysql:database=waitingroomdetail;host=loca lhost',
> $user, $password)
> or die $DBI::errstr;
>
> Is it possible to change this $DBI::errstr message.

No. Of course you can throw another string based on $DBI::err, for example

or die MyErrorMessage($DBI::err);


Jochen



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Error Messages

am 23.10.2003 17:05:48 von Jochen Wiedmann

mark o' sullivan wrote:

> Anyone know is it possible to change error messages. Say in the following
> case:
> my $dbh =
> DBI->connect('DBI:mysql:database=waitingroomdetail;host=loca lhost',
> $user, $password)
> or die $DBI::errstr;
>
> Is it possible to change this $DBI::errstr message.

No. Of course you can throw another string based on $DBI::err, for example

or die MyErrorMessage($DBI::err);


Jochen



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org