depricate $session->errorHandler over $session->log

This commit is contained in:
JT Smith 2008-05-30 01:31:50 +00:00
parent b4a45c6ada
commit 3ae5587b64
3 changed files with 21 additions and 7 deletions

View file

@ -3,6 +3,7 @@
- SQL Form no longer ships with WebGUI. Use Thingy instead. However, out of - SQL Form no longer ships with WebGUI. Use Thingy instead. However, out of
respect for those using it, we only uninstall it if you have no sites using respect for those using it, we only uninstall it if you have no sites using
it. it.
- Depricated $session->errorHandler in favor of $session->log.
- AssetProxy macro can now use asset id as a parameter like so: - AssetProxy macro can now use asset id as a parameter like so:
^AssetProxy(abcdefghijklmnopqrstuv,assetId); ^AssetProxy(abcdefghijklmnopqrstuv,assetId);
- Exposed keywords API to all assets through edit screen. Now keywords are - Exposed keywords API to all assets through edit screen. Now keywords are

View file

@ -60,7 +60,7 @@ B<NOTE:> It is important to distinguish the difference between a WebGUI session
$session->db $session->db
$session->dbSlave $session->dbSlave
$session->env $session->env
$session->errorHandler $session->log
$session->form $session->form
$session->http $session->http
$session->icon $session->icon
@ -261,16 +261,13 @@ sub env {
=head2 errorHandler ( ) =head2 errorHandler ( )
Returns a WebGUI::Session::ErrorHandler object. An alias for log(). Depricated. Will be removed in WebGUI 8.
=cut =cut
sub errorHandler { sub errorHandler {
my $self = shift; my $self = shift;
unless (exists $self->{_errorHandler}) { return $self->log;
$self->{_errorHandler} = WebGUI::Session::ErrorHandler->new($self);
}
return $self->{_errorHandler};
} }
#------------------------------------------------------------------- #-------------------------------------------------------------------
@ -353,6 +350,22 @@ sub id {
} }
#-------------------------------------------------------------------
=head2 log ( )
Returns a WebGUI::Session::ErrorHandler object, which is used for logging.
=cut
sub log {
my $self = shift;
unless (exists $self->{_errorHandler}) {
$self->{_errorHandler} = WebGUI::Session::ErrorHandler->new($self);
}
return $self->{_errorHandler};
}
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 open ( webguiRoot, configFile [, requestObject, serverObject, sessionId, noFuss ] ) =head2 open ( webguiRoot, configFile [, requestObject, serverObject, sessionId, noFuss ] )

View file

@ -305,7 +305,7 @@ while(<FILE>) {
$u->status($user{status}); $u->status($user{status});
my $cmd = "WebGUI::Auth::".$authMethod; my $cmd = "WebGUI::Auth::".$authMethod;
my $load = "use ".$cmd; my $load = "use ".$cmd;
$session->errorHandler->fatal("Authentication module failed to compile: $cmd.".$@) if($@); $session->log->fatal("Authentication module failed to compile: $cmd.".$@) if($@);
eval($load); eval($load);
my $auth = eval{$cmd->new($session, $authMethod,$u->userId)}; my $auth = eval{$cmd->new($session, $authMethod,$u->userId)};
$auth->saveParams($u->userId,"WebGUI",{identifier=>$user{identifier}}); $auth->saveParams($u->userId,"WebGUI",{identifier=>$user{identifier}});