Fix send stacktrack to server

This commit is contained in:
Paulo Gustavo Veiga 2022-02-12 10:49:11 -08:00
parent 22490b4cd7
commit 1ce10efc53
2 changed files with 4 additions and 3 deletions

View File

@ -46,14 +46,15 @@ export function buildDesigner(options: DesignerOptions): Designer {
].join(' - '); ].join(' - ');
console.error(message); console.error(message);
alert(error.stack);
// Send error to server ... // Send error to server ...
$.ajax({ $.ajax({
method: 'post', method: 'post',
url: '/c/restful/logger/editor', url: '/c/restful/logger/editor',
headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
data: JSON.stringify({ data: JSON.stringify({
jsErrorMsg: message, jsErrorMsg: `${error.name} - ${error.message}`,
jsStack: JSON.stringify(error), jsStack: error.stack,
userAgent: navigator.userAgent, userAgent: navigator.userAgent,
mapId: options.mapId, mapId: options.mapId,
}), }),

View File

@ -413,7 +413,7 @@ class XMLSerializerPela implements XMLMindmapSerializer {
.forEach((child, index) => { .forEach((child, index) => {
if (child.getOrder() !== index) { if (child.getOrder() !== index) {
child.setOrder(index); child.setOrder(index);
console.log('Toppic with order sequence hole. Introducing fix.'); console.log('Toppic with order sequence hole. Introducing auto recovery sequence fix.');
} }
}); });