Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Fall back to just printing the exception itself.
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 26 Sep 2012 18:10:38 +0000 (20:10 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 26 Sep 2012 18:10:38 +0000 (20:10 +0200)
Useful when there's no message property, in case someone throws
just a string.

Fixes #325 - When setup fails with a string exception, nothing useful is printed

qunit/qunit.js

index ccba686..1cd13bb 100644 (file)
@@ -111,7 +111,7 @@ Test.prototype = {
                try {
                        this.testEnvironment.setup.call( this.testEnvironment );
                } catch( e ) {
-                       QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
+                       QUnit.pushFailure( "Setup failed on " + this.testName + ": " + ( e.message || e), extractStacktrace( e, 1 ) );
                }
        },
        run: function() {

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf