Skip to content
Snippets Groups Projects
Commit e2bd850e authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

raise TT2 error if any

parent 8727d618
No related branches found
No related tags found
No related merge requests found
......@@ -142,12 +142,15 @@ sub list_accounts {
db => $db
);
die "failed to update simpleSAMLphp configuration file\n"
unless IdPAccountManager::Tools::update_ssp_authsources(
eval {
IdPAccountManager::Tools::update_ssp_authsources(
$configuration->{templates_dir},
$configuration->{idp_accounts_file},
$accounts
);
};
die "failed to update simpleSAMLphp configuration file: $EVAL_ERROR"
if $EVAL_ERROR;
printf "Update simpleSamlPhp configuration file...\n";
}
......
......@@ -90,7 +90,7 @@ sub update_ssp_authsources {
accounts => $accounts
};
return $tt2->process($template, $data, $output);
$tt2->process($template, $data, $output) or die $tt2->error();
}
1;
......
......@@ -485,14 +485,18 @@ sub req_validate_token {
}
## Update simpleSAMLphp configuration to enable test accounts
unless (IdPAccountManager::Tools::update_ssp_authsources(
eval {
IdPAccountManager::Tools::update_ssp_authsources(
$self->{configuration}->{templates_dir},
$self->{configuration}->{idp_accounts_file},
\@accounts
)) {
);
};
if ($EVAL_ERROR) {
push @{ $self->{out}->{errors} }, "accounts_creation_failed";
$self->{logger}->error(
"Failed to create simpleSAMLphp configuration file"
$self->{logger}->errorf(
"Failed to create simpleSAMLphp configuration file: %s",
$EVAL_ERROR
);
return undef;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment