mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-21 21:57:56 +01:00
Split error message on browser error.
This commit is contained in:
parent
b67cd407a4
commit
609fdd7144
@ -167,8 +167,10 @@ final public class NotificationService {
|
|||||||
|
|
||||||
final Map<String, String> model = new HashMap<>();
|
final Map<String, String> model = new HashMap<>();
|
||||||
model.put("errorMsg", jsErrorMsg);
|
model.put("errorMsg", jsErrorMsg);
|
||||||
|
|
||||||
|
String mindmapXML = "";
|
||||||
try {
|
try {
|
||||||
model.put("mapXML", StringEscapeUtils.escapeXml(mindmap == null ? "map not found" : mindmap.getXmlStr()));
|
mindmapXML = StringEscapeUtils.escapeXml(mindmap == null ? "map not found" : mindmap.getXmlStr());
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
// Ignore ...
|
// Ignore ...
|
||||||
}
|
}
|
||||||
@ -176,6 +178,7 @@ final public class NotificationService {
|
|||||||
model.put("mapTitle", mindmap.getTitle());
|
model.put("mapTitle", mindmap.getTitle());
|
||||||
|
|
||||||
logError(model, user, request);
|
logError(model, user, request);
|
||||||
|
logger.error("Unexpected editor mindmap => " + mindmapXML);
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
||||||
@ -193,7 +196,7 @@ final public class NotificationService {
|
|||||||
.map(key -> key + "=" + model.get(key))
|
.map(key -> key + "=" + model.get(key))
|
||||||
.collect(Collectors.joining(", ", "{", "}"));
|
.collect(Collectors.joining(", ", "{", "}"));
|
||||||
|
|
||||||
logger.error("Unexpected editor error => " + errorAsString);
|
logger.error("Unexpected editor info => " + errorAsString);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reportJavaException(@NotNull Throwable exception, @Nullable User user, @NotNull HttpServletRequest request) {
|
public void reportJavaException(@NotNull Throwable exception, @Nullable User user, @NotNull HttpServletRequest request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user