Simple client side error logging
metric.io
Simple client side error logging
1–10 of 10 posts
Re: Simple client side error logging
#2This code, for example, reports each otherwise unhandled exception to user prettily using Messenger.js:
window.angular.module('yourApp', []).
//
factory('$exceptionHandler', [
'$log',
function ($log) {
return function (exception, cause) {
// Log to console
$log.error.apply($log, arguments);
// Show to user
var msg = sprintf("Error: %s", exception.message);
if (cause) { msg = sprintf("%s. %s", msg, cause); }
window.Messenger().post({
type: 'error',
hideAfter: 0,
showCloseButton: true,
message: msg
});
};
}
]);
To replicate functionality from the article, you could make a request using $http service in there.(I assume it's possible to override not $exceptionHandler, but $log service directly. This would allow for more extensive server-side log collection, not just error reporting. Never tried that myself, though.)
Re: Simple client side error logging
#3Re: Simple client side error logging
#4"free trail", "build lasting realtionships", "Create pomotions", "siing how your customers are interacting"
You've got a beautiful site but these sorts of errors give the wrong first impression.
Re: Simple client side error logging
#5Slightly off-topic, but please have someone proofread your stuff. In addition to "shear number" (it's sheer number), on the Metric.io home page I noticed the following at first glance: "free trail", "build lasting realtionships", "Create pomotions", "siing how your customers are interacting" You've got a beautiful site but these sorts of errors give the wrong first impression.
Re: Simple client side error logging
#6Slightly off-topic, but please have someone proofread your stuff. In addition to "shear number" (it's sheer number), on the Metric.io home page I noticed the following at first glance: "free trail", "build lasting realtionships", "Create pomotions", "siing how your customers are interacting" You've got a beautiful site but these sorts of errors give the wrong first impression.
Thanks for that, must have missed them... fixing now!
and the heading and menus on your page overlap on Chrome under Windows when the browser is sufficiently narrow
Re: Simple client side error logging
#7Slightly off-topic, but please have someone proofread your stuff. In addition to "shear number" (it's sheer number), on the Metric.io home page I noticed the following at first glance: "free trail", "build lasting realtionships", "Create pomotions", "siing how your customers are interacting" You've got a beautiful site but these sorts of errors give the wrong first impression.
'All beta-barrels can be classified in terms of two integer parameters: the number of strands in the beta-sheet, n, and the "shear number", S, a measure of the stagger of the strands in the beta-sheet.'
Re: Simple client side error logging
#8I have refactored my js code to have try - catch block in all my critical paths in Babckbone modules; this approach works on all google closure compiler generate javascript code. I really wonder why most people don't do this more often.
Re: Simple client side error logging
#9Re: Simple client side error logging
#10This is one such time, despite knowing about onerror I honestly don't think I would have ever thought of doing this myself...it's simply brilliant.
Thank you for the post.