Handle deleted maps propertly.

This commit is contained in:
Paulo Gustavo Veiga
2013-03-29 21:09:28 -03:00
parent bd80d95d22
commit 8e66c97aa3
11 changed files with 109 additions and 55 deletions

View File

@@ -154,12 +154,12 @@ final public class NotificationService {
// }
}
public void reportJavascriptException(@NotNull Mindmap mindmap, @Nullable User user, @Nullable String jsErrorMsg, @NotNull HttpServletRequest request) {
public void reportJavascriptException(@Nullable Mindmap mindmap, @Nullable User user, @Nullable String jsErrorMsg, @NotNull HttpServletRequest request) {
final Map<String, String> model = new HashMap<String, String>();
model.put("errorMsg", jsErrorMsg);
try {
model.put("mapXML", StringEscapeUtils.escapeXml(mindmap.getXmlStr()));
model.put("mapXML", StringEscapeUtils.escapeXml(mindmap == null ? "map not found" : mindmap.getXmlStr()));
} catch (UnsupportedEncodingException e) {
// Ignore ...
}