Skip to content

Commit

Permalink
cells: log bugs found by CellShell
Browse files Browse the repository at this point in the history
When a bug is detected CommandExecutor will throw
CommandPanicException.  This is treated by CellShell like any other
exception: no effort is made to log that a bug was found or
provide a stack-trace.

This patch fixes this.

Target: master
Patch: https://rb.dcache.org/r/7871/
Acked-by: Gerd Behrmann
Request: 2.11
Request: 2.10
Request: 2.9
Request: 2.8
Request: 2.7
Request: 2.6
  • Loading branch information
paulmillar committed Feb 25, 2015
1 parent f8b5633 commit be0a6e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/cells/src/main/java/dmg/cells/nucleus/CellShell.java
Expand Up @@ -1611,6 +1611,13 @@ public void execute(String source, Reader in, Writer out, Writer err, Args args)
println(out, answer.toString());
} else {
Throwable error = (Throwable) answer;

if (error instanceof CommandPanicException) {
_log.error("Bug detected in dCache; please report this " +
"to <support@dcache.org> with the following " +
"information.", error.getCause());
}

if (_doOnExit != null) {
String msg =
String.format("%s: line %d: %s", source, no,
Expand Down

0 comments on commit be0a6e1

Please sign in to comment.