1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- goog.provide('goog.testing.JsUnitException');
- goog.setTestOnly();
- goog.require('goog.testing.stacktrace');
- goog.testing.JsUnitException = function(comment, opt_message) {
- this.isJsUnitException = true;
- this.message = (comment ? comment : '') +
- (comment && opt_message ? '\n' : '') + (opt_message ? opt_message : '');
- this.stackTrace = goog.testing.stacktrace.get();
-
- this.comment = comment || null;
- this.jsUnitMessage = opt_message || '';
-
- if (Error.captureStackTrace) {
- Error.captureStackTrace(this, goog.testing.JsUnitException);
- } else {
- this.stack = new Error().stack || '';
- }
- };
- goog.inherits(goog.testing.JsUnitException, Error);
- goog.testing.JsUnitException.prototype.toString = function() {
- return this.message;
- };
|