Hi @Sonukapoor,
The $exceptionHandler catch Angular exceptions (missing controleur for example).
For JS exceptions, you need to add a window.onerror
function (cf the second par of my initial post)
Hi @Sonukapoor,
The $exceptionHandler catch Angular exceptions (missing controleur for example).
For JS exceptions, you need to add a window.onerror
function (cf the second par of my initial post)
Hi, Not sure what you mean with its missing the controleur?
I understand what you mean. Let me make some changes to the code. Thanks for sharing your code. Its very appreciated.
Youāre welcome
Iām happy if it helps people.
@Ioicknuchel how did you define that track function for sending exception to server
@vinaygarg502 I do some complicated & custom things⦠You can see my code here : https://github.com/saloonapp/saloon-app/blob/v1/www/js/config/_log.js
Basically, my track()
function save errors in localStorage and then sync them with backendā¦
This is quite custom⦠Maybe you want to use SaaS services like https://getsentry.com/ā¦
Thakyou ⦠thats what i was looking for
@loicknuchel hey thank you for sharing your code . Can you please tell how can I use this function to throw exception manually and pass on some other information as well. Like I already have a catch or error function linked with some http call or some other function and I want to throw the exception manually from inside the function so that I may pass some custom data as well. And later sync the error report with my server just as you did with track() function.