It's better to die than to return in failure.
This commit is contained in:
parent
23210c84e0
commit
9c3a3b1b79
1 changed files with 7 additions and 3 deletions
|
|
@ -602,14 +602,18 @@ sub processConfigurationForm {
|
|||
my $class = shift;
|
||||
my $session = shift;
|
||||
|
||||
return undef unless ($class->getPluginList($session));
|
||||
if (! $class->getPluginList($session)) {
|
||||
WebGUI::Error->throw(error => "No graphing plugins listed in config")
|
||||
}
|
||||
|
||||
my $namespace = "WebGUI::Image::".$session->form->process('graphingPlugin');
|
||||
$namespace =~ s/_/::/g;
|
||||
|
||||
return undef unless (isIn($namespace, @{$class->getPluginList($session)}));
|
||||
if (! isIn($namespace, @{$class->getPluginList($session)})) {
|
||||
WebGUI::Error->throw(error => "Graphing plugin not available")
|
||||
}
|
||||
|
||||
my $graph = $class->load($session, $namespace);
|
||||
my $graph = $class->load($session, $namespace);
|
||||
|
||||
$graph->setConfiguration($session->form->paramsHashRef);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue