silverstripe-behat-extension
silverstripe-behat-extension copied to clipboard
JS stacktrace
We catch window.onerror
, but only output the message, which isn't very helpful and makes for a lot of Heisenbugs. The HTML5 spec supports error objects in this method now, so we should use it.
Look into Stacktrace.js, might save us some time: https://github.com/eriwen/javascript-stacktrace See https://github.com/eriwen/javascript-stacktrace/issues/26 for its onerror support
I'm struggling with this right now. If I struggle any more I might need to actually implement this. :)
I've made a basic attempt at this with https://github.com/silverstripe-labs/silverstripe-behat-extension/commit/58f54ae239be123fc245ccf561dd8ab298b587a2
Fortunately FF 31 supports error object in window.onerror.