Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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