Throw an exception if you don't get a session argument in classic WebGUI instanciator syntax.

This commit is contained in:
Colin Kuskie 2010-10-28 16:54:07 -07:00
parent f5069979f0
commit 2554a45a15

View file

@ -45,7 +45,7 @@ around BUILDARGS => sub {
my $userId = $_[1] ? $_[1] : $protoSession->user->userId;
return $className->$orig(session => $protoSession, userId => $userId, );
}
return $className->$orig(@_);
WebGUI::Error::InvalidParam->throw(error => "Need a session.");
};