Error Logging Improved

This commit is contained in:
Luis Fernando Molina committed 2019-04-10 13:51:34 +02:00
1 parent f665ebf6a7
commit 2bb58adadc
15 files changed
+71 -72

No files matched your search

+7 -7
View File
@@ -34,7 +34,7 @@ function newAnimation () {
thisObject.stop()
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] finalize -> err = ' + err) }
if (ERROR_LOG === true) { logger.write('[ERROR] finalize -> err = ' + err.stack) }
}s
}
@@ -45,7 +45,7 @@ function newAnimation () {
/* Nothing to do here yet. */
callBackFunction(GLOBAL.CUSTOM_OK_RESPONSE)
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = ' + err) }
if (ERROR_LOG === true) { logger.write('[ERROR] initialize -> err = ' + err.stack) }
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
}
}
@@ -56,7 +56,7 @@ function newAnimation () {
animationLoop() // Inside this function the animation process is started, and at the same time it creates a loop.
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] start -> err = ' + err) }
if (ERROR_LOG === true) { logger.write('[ERROR] start -> err = ' + err.stack) }
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
}
}
@@ -67,7 +67,7 @@ function newAnimation () {
window.cancelAnimationFrame(animationLoopHandle)
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] stop -> err = ' + err) }
if (ERROR_LOG === true) { logger.write('[ERROR] stop -> err = ' + err.stack) }
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
}
}
@@ -78,7 +78,7 @@ function newAnimation () {
callBackFunctions.set(key, callBack)
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] addCallBackFunction -> err = ' + err) }
if (ERROR_LOG === true) { logger.write('[ERROR] addCallBackFunction -> err = ' + err.stack) }
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
}
}
@@ -89,7 +89,7 @@ function newAnimation () {
callBackFunctions.delete(key)
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] removeCallBackFunction -> err = ' + err) }
if (ERROR_LOG === true) { logger.write('[ERROR] removeCallBackFunction -> err = ' + err.stack) }
callBackFunction(GLOBAL.DEFAULT_FAIL_RESPONSE)
}
}
@@ -126,7 +126,7 @@ function newAnimation () {
animationLoopHandle = window.requestAnimationFrame(animationLoop)
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] animationLoop -> err = ' + err) }
if (ERROR_LOG === true) { logger.write('[ERROR] animationLoop -> err = ' + err.stack) }
}
}