--- nfo/perl/libs/DesignPattern/Exception.pm 2003/02/19 00:35:09 1.1 +++ nfo/perl/libs/DesignPattern/Exception.pm 2003/02/20 20:53:55 1.2 @@ -1,7 +1,10 @@ ## ------------------------------------------------------------------------ -## $Id: Exception.pm,v 1.1 2003/02/19 00:35:09 joko Exp $ +## $Id: Exception.pm,v 1.2 2003/02/20 20:53:55 joko Exp $ ## ------------------------------------------------------------------------ ## $Log: Exception.pm,v $ +## Revision 1.2 2003/02/20 20:53:55 joko +## + fix: using Object's basic log method if not running together with the Logger +## ## Revision 1.1 2003/02/19 00:35:09 joko ## + initial commit ## @@ -13,6 +16,9 @@ use strict; use warnings; + +use base qw( DesignPattern::Object ); + sub checkExceptions { my $self = shift; @@ -21,7 +27,13 @@ # behaviour B: log the error message as a warning if ($@) { - $self->log($@, 'warning'); + if ($self->can('log')) { + $self->log($@, 'warning'); + } else { + #print "warning: ", $@, "\n"; + #print "warning: ", $@, "\n"; + $self->log_basic($@, 'warning'); + } } }