I wrote a bookmarklet, when the user will click on it in his browser it will do some actions on the current website and show some results in a popup.
In some websites my bookmarklet fails to load because problems may exist in the current website.
My bookmarklet code is using the jquery library.
In some cases the errors happens in the jquery library because some conflicts or something i don't know.
My Question is:
Can i surround all my bookmarklet code with one try catch which will catch any error happen in all my code and redirect the user to another page 'error page'?