Add report notification by email support.

This commit is contained in:
Paulo Gustavo Veiga
2012-06-23 14:39:50 -03:00
parent 2d8fa5c259
commit c8837baadd
16 changed files with 250 additions and 39 deletions

View File

@@ -30,13 +30,26 @@ function buildDesigner(options) {
window.waitDialog = null;
});
window.onerror = function(e) {
window.onerror = function(message, url, lineNo) {
// Log error message ...
if (window.waitDialog) {
window.waitDialog.close.delay(1000, window.waitDialog);
window.waitDialog = null;
}
var req = new Request({
method: 'post',
url: "/service/logger/editor",
headers: {"Content-Type":"application/json","Accept":"application/json"},
emulation:false,
urlEncoded:false
}).post(JSON.encode({
jsErrorMsg : "message: " + message + ", line:" + lineNo + ", :" + url,
jsStack : window.errorStack,
userAgent: navigator.userAgent,
mapId: options.mapId}));
errorDialog.show();
console.log(e);
};
// Configure default persistence manager ...