Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid exceptions when dumping ctx #625

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading