Skip to content

Commit

Permalink
Avoid exceptions when dumping ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
barspi committed Nov 21, 2024
1 parent 0d949e8 commit e542dd0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions jpos/src/main/java/org/jpos/transaction/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,11 @@ protected void dumpEntry (PrintStream p, String indent, Map.Entry<Object,Object>
Object value = entry.getValue();
if (value instanceof Loggeable) {
p.println();
((Loggeable) value).dump(p, indent + " ");
try {
((Loggeable) value).dump(p, indent + " ");
} catch (Exception ex) {
ex.printStackTrace(p);
}
p.print(indent);
} else if (value instanceof Element) {
p.println();
Expand Down Expand Up @@ -470,10 +474,15 @@ else if (value instanceof LogEvent) {
((LogEvent) value).dump(p, indent);
p.print(indent);
} else if (value != null) {
LogUtil.dump(p, indent, value.toString());
try {
LogUtil.dump(p, indent, value.toString());
} catch (Exception ex) {
ex.printStackTrace(p);
}
}
p.println();
}

/**
* return a LogEvent used to store trace information
* about this transaction.
Expand Down

0 comments on commit e542dd0

Please sign in to comment.