I’d check out window.onerror
Example:
window.onerror = function(message, url, lineNumber) {
//save error and send to server for example.
return true;
};
Keep in mind that returning true will prevent the firing of the default handler, and returning false will let the default handler run.
Related Contents:
- What is the difference between client-side and server-side programming?
- How to create a file in memory for user to download, but not through server?
- How to export JavaScript array info to csv (on client side)?
- Is it not possible to stringify an Error using JSON.stringify?
- What’s a good way to extend Error in JavaScript?
- Sending emails with Javascript
- Image resizing client-side with JavaScript before upload to the server
- What’s the cause of the error ‘getaddrinfo EAI_AGAIN’?
- Cryptic “Script Error.” reported in Javascript in Chrome and Firefox
- Accessing control client name and not ID in ASP.NET
- Should a Promise.reject message be wrapped in Error?
- Is it possible to check dimensions of image before uploading?
- Single Page Application: advantages and disadvantages [closed]
- How can I run a program or batch file on the client side?
- Logging Clientside JavaScript Errors on Server [closed]
- How do I handle errors with promises?
- What is the difference between `throw new Error` and `throw someObject`?
- Check if localStorage is available
- Throwing an Error in jQuery’s Deferred object
- how to make sure only my own website (clientside code) can talk to Firebase backend?
- Save to Local File from Blob
- Strange Unexpected token ILLEGAL in JavaScript [closed]
- Handling specific errors in JavaScript (think exceptions)
- IF Statement Always True
- AngularJS: Understanding design pattern
- Node.js catch ENOMEM error thrown after spawn
- Axios. How to get error response even when api return 404 error, in try catch finally
- Pagination: Server Side or Client Side?
- Can you get a public Facebook page’s feed using Graph API without asking a user to allow?
- Image brightness detection in client side script
- image.onError event never fires, but image isn’t valid data – need a work around
- How to use JavaScript regex over multiple lines?
- Can I perform a DNS lookup (hostname to IP address) using client-side Javascript?
- What is the “double tilde” (~~) operator in JavaScript? [duplicate]
- AJAX Mailchimp signup form integration
- How does one capture a Mac’s command key via JavaScript?
- How do I pass the this context to a function?
- Works in Chrome, but breaks in Safari: Invalid regular expression: invalid group specifier name /(?
- jQuery – script tags in the HTML are parsed out by jQuery and not executed
- Getting an absolute URL from a relative one. (IE6 issue)
- How to blur the div element?
- Is it possible to dynamically scale text size based on browser width?
- jQuery change event on not firing in IE
- How to use both onclick and ondblclick on an element?
- How to get response from S3 getObject in Node.js?
- TypeScript – Element implicitly has an ‘any’ type because expression of type ‘string’ can’t be used to index type
- JavaScript editor within Eclipse [closed]
- Execute Background Task In Javascript
- How to keep the browser history in sync when using Ajax?
- Is there a way to throttle javascript performance to simulate a slow client