1

Closed

Exceptions cause exception in error report

description

If my code throws a nasty, uncaught exception (yes, admittedly my fault) the error report fails in encodeHtmlEntities because the "string" input parameter is actually an object -- so input.replace throws its own exception.

One workaround would be in Test.run(), where I changed:
} catch (err) {
       testResult.errors.push(new TestDescription(testName, prop, err);
to:
} catch (err) {
       testResult.errors.push(new TestDescription(testName, prop, err.toString());
Closed Sep 9, 2014 at 1:28 PM by Sohnee

comments

hummingburt wrote Feb 26, 2014 at 7:20 PM

Oops. make that: err.toString()));

Sohnee wrote Sep 9, 2014 at 1:28 PM

This has been added - thank you for the suggestion...
                            try {
                                testClass[prop](testContext);
                                testResult.passes.push(new TestDescription(testName, prop, 'OK'));
                            } catch (err) {
                                testResult.errors.push(new TestDescription(testName, prop, err.toString()));
                            }

wrote Sep 9, 2014 at 1:28 PM