Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Wrap kun exceptions som ParserException hvis de ikke allerede er det

  • Loading branch information...
commit e8eba0c24017de8b4447f638b3ad236cda16fe9e 1 parent 3e25bfc
@jrftrifork jrftrifork authored
View
7 src/main/java/dk/nsi/sdm4/autorisation/parser/AutorisationParser.java
@@ -102,7 +102,12 @@ public void process(File dataset) throws ParserException {
} catch (Exception e) {
slaLogItem.setCallResultError("AutorisationImporter failed - Cause: " + e.getMessage());
slaLogItem.store();
- throw new ParserException(e);
+ if (e instanceof ParserException) {
+ // do not wrap more than we need to
+ throw (ParserException) e;
+ } else {
+ throw new ParserException(e);
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.