Ubreakable Javascript

I was wondering if there is a method in which I can guarantee that some kind of JS code will always run regardless of any JS error on the site.

I want to make a script log that logs my user activity on the admin page, so if something goes wrong, I can easily recreate the workflow that caused the error.

So is there any method for this?

Many thanks.

+4
source share
1 answer

With any language or any program that you cannot guarantee.

The only way to create a free program is to create it through rigorous testing.

  • unit test .
  • try... catch mdn

  • console.log

JavaScript, , , , .

:. , - , , - . , .

-1

Source: https://habr.com/ru/post/1621271/


All Articles