Skip to content
Browse files

Fixed bug that caused testbot crash on"throw undefined" in global exc…

…eptions
  • Loading branch information...
1 parent 79ea59b commit fa1aa66edd31469e4efd2df19e21602414e6e31a @jfd committed Feb 17, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 testbot.js
View
6 testbot.js
@@ -290,8 +290,10 @@ function create_async_constructor(async, timeout, fn) {
// Catch all global uncaught exceptions. This is probably raised by the
// ´assert´ module.
function global_error_handle(err) {
- if (err.name == 'AssertionError') {
- result.failure = syncerr.message || syncerr.actual;
+ if (!err) {
+ result.error = '<undefined>';
+ } else if (err.name == 'AssertionError') {
+ result.failure = err.message || syncerr.actual;
} else {
result.error = err.toString();
}

0 comments on commit fa1aa66

Please sign in to comment.
Something went wrong with that request. Please try again.