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

simplification: no exception thrown in parse() method

parent e3ce6ce2
No related branches found
No related tags found
No related merge requests found
......@@ -159,13 +159,9 @@ sub parse_federation_metadata {
};
die "unable to load federation metadata: $EVAL_ERROR" if $EVAL_ERROR;
my $data;
eval {
$data = $federation_metadata->parse(
entity_id => $options{sp_entityid},
);
};
die "unable to parse federation metadata: $EVAL_ERROR\n" if $EVAL_ERROR;
my $data = $federation_metadata->parse(
entity_id => $options{sp_entityid},
);
printf "Document %s parsed\n",
$configuration->{federation_metadata_file_path};
......
......@@ -285,19 +285,9 @@ sub req_select_sp {
return undef;
}
eval {
$federation_metadata->parse(
filter_entity_id => $self->{in}->{sp_entityid}
);
};
if ($EVAL_ERROR) {
push @{ $self->{out}->{errors} }, "internal";
$self->{logger}->log(
level => LOG_ERROR,
message => "Failed to parse federation metadata: $EVAL_ERROR"
);
return undef;
}
$federation_metadata->parse(
filter_entity_id => $self->{in}->{sp_entityid}
);
## Create a serviceprovider object to store major parameters for this SP in DB
my $service_provider = IdPAccountManager::Data::ServiceProvider->new(
......
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