Added type of error to the captured logs. Fixed window.onerror so uncaught exceptions are captured. Expanded tests to cover uncaught excentions