AssertionError.js revision 625ac94d269a4ae4992b98f0cb3d66a32f1d41d0
/**
* Error is thrown whenever an assertion fails. It provides methods
* to more easily get at error information and also provides a base class
* from which more specific assertion errors can be derived.
*
* @param {String} message The message to display when the error occurs.
* @namespace Test
* @class AssertionError
* @constructor
*/
/**
* Error message. Must be duplicated to ensure browser receives it.
* @type String
* @property message
*/
/**
* The name of the error that occurred.
* @type String
* @property name
*/
this.name = "Assert Error";
};
//restore constructor
/**
* Returns a fully formatted error for an assertion failure. This should
* be overridden by all subclasses to provide specific information.
* @method getMessage
* @return {String} A string describing the error.
*/
getMessage : function () {
return this.message;
},
/**
* Returns a string representation of the error.
* @method toString
* @return {String} A string representation of the error.
*/
toString : function () {
}
};