mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
Split error message
This commit is contained in:
parent
f35d145fb8
commit
83cff3f66d
@ -166,9 +166,9 @@ final public class NotificationService {
|
|||||||
|
|
||||||
public void reportJavascriptException(@Nullable Mindmap mindmap, @Nullable User user, @NotNull RestLogItem errorItem, @NotNull HttpServletRequest request) {
|
public void reportJavascriptException(@Nullable Mindmap mindmap, @Nullable User user, @NotNull RestLogItem errorItem, @NotNull HttpServletRequest request) {
|
||||||
|
|
||||||
final Map<String, String> model = new HashMap<>();
|
final Map<String, String> summary = new HashMap<>();
|
||||||
model.put("JS-MSG", errorItem.getJsErrorMsg());
|
summary.put("JS-MSG", errorItem.getJsErrorMsg());
|
||||||
model.put("JS-STACK", errorItem.getJsStack());
|
summary.put("JS-STACK", errorItem.getJsStack());
|
||||||
|
|
||||||
String mindmapXML = "";
|
String mindmapXML = "";
|
||||||
try {
|
try {
|
||||||
@ -176,11 +176,12 @@ final public class NotificationService {
|
|||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
// Ignore ...
|
// Ignore ...
|
||||||
}
|
}
|
||||||
model.put("mapId", Integer.toString(mindmap.getId()));
|
summary.put("mapId", Integer.toString(mindmap.getId()));
|
||||||
model.put("mapTitle", mindmap.getTitle());
|
summary.put("mapTitle", mindmap.getTitle());
|
||||||
|
|
||||||
logError(model, user, request);
|
logError(summary, user, request);
|
||||||
logger.error("Unexpected editor mindmap => " + mindmapXML);
|
logger.error("Unexpected editor mindmap => " + mindmapXML);
|
||||||
|
logger.error("Unexpected editor JS Stack => " + errorItem.getJsErrorMsg() + "-" + errorItem.getJsStack());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void logError(@NotNull Map<String, String> model, @Nullable User user, @NotNull HttpServletRequest request) {
|
private void logError(@NotNull Map<String, String> model, @Nullable User user, @NotNull HttpServletRequest request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user