Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josketres/9169857 to your computer and use it in GitHub Desktop.
Save josketres/9169857 to your computer and use it in GitHub Desktop.
Ejemplo de reporte de errores utilizando stacktrace.js
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