Throw an exception if you don't get a session argument in classic WebGUI instanciator syntax.
This commit is contained in:
parent
f5069979f0
commit
2554a45a15
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ around BUILDARGS => sub {
|
||||||
my $userId = $_[1] ? $_[1] : $protoSession->user->userId;
|
my $userId = $_[1] ? $_[1] : $protoSession->user->userId;
|
||||||
return $className->$orig(session => $protoSession, userId => $userId, );
|
return $className->$orig(session => $protoSession, userId => $userId, );
|
||||||
}
|
}
|
||||||
return $className->$orig(@_);
|
WebGUI::Error::InvalidParam->throw(error => "Need a session.");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue