Reworked error handling to propogate errors downward, especially when webgui.debug is set

This commit is contained in:
Scott Walters 2011-07-26 01:26:03 -04:00
parent b815228a1b
commit e945a94c63
12 changed files with 132 additions and 110 deletions

View file

@ -47,13 +47,8 @@ sub call {
$app = Plack::Middleware::SimpleLogger->wrap( $app );
}
my $session = try {
$env->{'webgui.session'} = WebGUI::Session->open( $config, $env );
} catch {
# We don't have a logger object, so for now just warn() the error
warn "Unable to instantiate WebGUI::Session - $_";
return; # make sure $session assignment is undef
};
my $session = $env->{'webgui.session'} = WebGUI::Session->open( $config, $env ) or
die "Unable to instantiate WebGUI::Session - $_";
if ( !$session ) {