- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2024 09:26 PM
I would like to create a process that detects when an error occurs in a UI page, UI policy, or client script.
I know that you can use "try~catch" to catch errors, but is there a way to implement this in a single client script or the like to detect errors in the browser?
I considered incorporating "try~catch" into the client-side processing, but if there is a common error collection process, I would like to implement it.
I would like to be able to catch error events, etc.
Alternatively, if I could catch some kind of event and constantly determine errors, I think I could record browser errors.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2024 09:29 PM
the only possible way is to use try catch block and if you wish to log it in system logs then within the catch block you can use GlideAjax to write to add it in system logs using gs.info()
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2024 09:29 PM
the only possible way is to use try catch block and if you wish to log it in system logs then within the catch block you can use GlideAjax to write to add it in system logs using gs.info()
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-29-2024 09:48 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2024 09:29 PM
you can throw the exception and log it in browser console but it won't be stored in system logs though.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2024 10:58 PM
Is there a way to catch all exceptions in one client script or UI script?