1

I'm using AngularJS 1.5.x to dynamically add a javascript tag and code to the DOM, which will be executed by FramerJS.

Occasionally this will throw errors and is desired and expected.

FramerJS has it's own way of handling errors and displaying them nicely within the DOM to the user

Events.wrap(window).addEventListener "error", (e) =>
                @showError(e.message)

FramerJS showError is a private method and not accessible.

I know I can extend/decorate Angular's excpetion handler like so https://docs.angularjs.org/api/ng/service/$exceptionHandler

My problem is if I use this method to throw a new error that is available on the window I will cause an infinite $digest loop, handling my own errors I create.

Can anyone point me in the right direction here? Should I go about monkey patching FramerJS to give me access to the showError method I need, or is there something I'm missing.

First stackoverflow question, apologies if it's not in the right format.

James Ryan
  • 11
  • 1

0 Answers0