@bradtaniguchi Can you review this PR? I have created the sessionError event listener/emitter. This is called from within the errorHandler method which is called from the catch blocks. It sends the error and the method from which the error occurred. Additionally, I check in the errorHandler whether the callback exists, and only call it if so.
I created a test that only tests the errorHandler method (all tests pass). If you're able to come up with a way to test from within the actual methods (I'm not positive on how to throw an error within the method for the purpose of testing only), that would be great.
@bradtaniguchi Can you review this PR? I have created the
sessionError
event listener/emitter. This is called from within theerrorHandler
method which is called from thecatch
blocks. It sends the error and the method from which the error occurred. Additionally, I check in theerrorHandler
whether thecallback
exists, and only call it if so.I created a test that only tests the
errorHandler
method (all tests pass). If you're able to come up with a way to test from within the actual methods (I'm not positive on how to throw an error within the method for the purpose of testing only), that would be great.