Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
poutsma committed Nov 7, 2019
1 parent bf36f49 commit 55f3f12
Showing 1 changed file with 4 additions and 16 deletions.
Expand Up @@ -245,19 +245,9 @@ protected void hookOnNext(DataBuffer buffer) {

@Override
protected void hookOnError(Throwable ex) {
try {
if (this.parser != null) {
this.parser.close();
}
}
catch (IOException ex2) {
// ignore
}
finally {
if (this.listener != null) {
int index = this.storageFactory.getCurrentPartIndex();
this.listener.onError("Failure while parsing part[" + index + "]", ex);
}
if (this.listener != null) {
int index = this.storageFactory.getCurrentPartIndex();
this.listener.onError("Failure while parsing part[" + index + "]", ex);
}
}

Expand All @@ -276,9 +266,7 @@ protected void hookFinally(SignalType type) {
}
}
catch (IOException ex) {
if (this.listener != null) {
this.listener.onError("Error while closing parser", ex);
}
// ignore
}
}

Expand Down

0 comments on commit 55f3f12

Please sign in to comment.