diff --git a/javascript/src/errors/UnexpectedError.js b/javascript/src/errors/UnexpectedError.js index 20e767f..08208b2 100644 --- a/javascript/src/errors/UnexpectedError.js +++ b/javascript/src/errors/UnexpectedError.js @@ -13,7 +13,7 @@ YUITest.UnexpectedError = function (cause){ //call superclass - YUITest.AssertionError.call(this, "Unexpected error: " + cause.message); + YUITest.AssertionError.call(this, "Unexpected error: " + (cause.message || cause) ); /** * The unexpected error that occurred.