Created
January 3, 2020 13:48
-
-
Save pawndev/2eb8e2f2c712495fe067707678908d1a to your computer and use it in GitHub Desktop.
Log on catch in JavaScript/TypeScript
This file contains 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
console.log("error object:"); | |
console.log(err); | |
console.log(); | |
console.log("error object toString():"); | |
console.log("\t" + err.toString()); | |
console.log(); | |
console.log("error object attributes: "); | |
console.log('\tname: ' + err.name + ' message: ' + err.message + ' at: ' + err.at + ' text: ' + err.text); | |
console.log(); | |
console.log("error object stack: "); | |
console.log(err.stack); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment