2 |
## $Id$ |
## $Id$ |
3 |
## ------------------------------------------------------------------------ |
## ------------------------------------------------------------------------ |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.2 2003/02/20 20:53:55 joko |
6 |
|
## + fix: using Object's basic log method if not running together with the Logger |
7 |
|
## |
8 |
## Revision 1.1 2003/02/19 00:35:09 joko |
## Revision 1.1 2003/02/19 00:35:09 joko |
9 |
## + initial commit |
## + initial commit |
10 |
## |
## |
16 |
use strict; |
use strict; |
17 |
use warnings; |
use warnings; |
18 |
|
|
19 |
|
|
20 |
|
use base qw( DesignPattern::Object ); |
21 |
|
|
22 |
sub checkExceptions { |
sub checkExceptions { |
23 |
my $self = shift; |
my $self = shift; |
24 |
|
|
27 |
|
|
28 |
# behaviour B: log the error message as a warning |
# behaviour B: log the error message as a warning |
29 |
if ($@) { |
if ($@) { |
30 |
$self->log($@, 'warning'); |
if ($self->can('log')) { |
31 |
|
$self->log($@, 'warning'); |
32 |
|
} else { |
33 |
|
#print "warning: ", $@, "\n"; |
34 |
|
#print "warning: ", $@, "\n"; |
35 |
|
$self->log_basic($@, 'warning'); |
36 |
|
} |
37 |
} |
} |
38 |
|
|
39 |
} |
} |