Skip to content
Snippets Groups Projects
Commit 03c73f17 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

better error message management

parent d877dc75
Branches
Tags
No related merge requests found
......@@ -114,7 +114,10 @@ public class ApplicationView extends JFrame implements IView<ApplicationControll
// OutOfMermoryError message
private static final String OOME = "<html><body><span style=\"color:red\"><u><big>Salsa encountered a memory error! Unexpected behaviors</big> <i>(freezes, wrong connections, etc.)</i><big> may happen.<br />You should quit and restart Salsa.</u></big></span></body></html>";
private static final String OOME_SIMPLE = "Salsa encountered a memory error!";
private static final String OOME_SIMPLE = "Salsa encountered a memory error in thread %s";
// Other errors message
private static final String DEFAULT_ERROR = "Uncaught exception %s in thread %s";
private final transient ResourceBundle resourceBundle;
......@@ -370,8 +373,8 @@ public class ApplicationView extends JFrame implements IView<ApplicationControll
});
}
} finally {
LOGGER.error(memory ? OOME_SIMPLE
: "Uncaugh exception " + t.getClass().getSimpleName() + " in thread " + thread, t);
LOGGER.error(memory ? String.format(OOME_SIMPLE, thread)
: String.format(DEFAULT_ERROR, t.getClass().getSimpleName(), thread), t);
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment