From cd79d396d7bb03fd319d876d01ee8ebd59079f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Jos=C3=A9=20Cabrera=20Mu=C3=B1oz?= Date: Fri, 28 Sep 2012 11:03:20 -0300 Subject: [PATCH] Added string cause handling to the UnexpectedError constructor --- javascript/src/errors/UnexpectedError.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.