Created
February 23, 2014 10:48
-
-
Save josketres/9169857 to your computer and use it in GitHub Desktop.
Ejemplo de reporte de errores utilizando stacktrace.js
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
function buyItem(itemId) { | |
if(!isValidItemId(itemId)) { | |
var errorReport = printStackTrace().join('\n'); | |
sendErrorReport(errorReport); | |
return; | |
} | |
try { | |
doBuyTheItem(itemId); | |
} catch(error) { | |
var errorReport = printStackTrace({e: error}).join('\n'); | |
sendErrorReport(errorReport); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment