Created
June 12, 2024 18:25
-
-
Save ChecksumFailed/6ef839afe8099a9653ac1bc0cee76f0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Normalzies exception string for logging | |
* @param {Exception} e | |
* @returns {string} message | |
* @private | |
*/ | |
{ | |
_formatErrorMessage: function (e) { | |
try { | |
if (e instanceof Error) { | |
if (!gs.nil(e.name) && !gs.nil(e.lineNumber)) { | |
e.name += "(" + e.lineNumber + ")"; | |
} | |
return e.toString(); | |
} | |
if (typeof e === "string") { | |
return e; | |
} | |
} catch (e) { | |
return "_formatErrorMessage: fail."; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment