/[cvs]/nfo/perl/libs/DesignPattern/Exception.pm
ViewVC logotype

Diff of /nfo/perl/libs/DesignPattern/Exception.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Wed Feb 19 00:35:09 2003 UTC revision 1.2 by joko, Thu Feb 20 20:53:55 2003 UTC
# Line 2  Line 2 
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  ##  ##
# Line 13  package DesignPattern::Exception; Line 16  package DesignPattern::Exception;
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    
# Line 21  sub checkExceptions { Line 27  sub checkExceptions {
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  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed