1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

More info in case of error

This commit is contained in:
Laurent Cozic
2017-10-25 21:23:48 +01:00
parent 52f25c26d2
commit 31bfa72bca
3 changed files with 4 additions and 2 deletions

View File

@ -45,6 +45,8 @@ class Logger {
if (typeof object === 'object') {
if (object instanceof Error) {
output = object.toString();
if (object.code) output += "\nCode: " + object.code;
if (object.request) output += "\nRequest: " + object.request;
if (object.stack) output += "\n" + object.stack;
} else {
output = JSON.stringify(object);