Yahoo! UI Library

yuitest  2.5.2

Yahoo! UI Library > yuitest > YAHOO.util.AssertionError

Show Private Show Protected

Class YAHOO.util.AssertionError - extends Error

Known Subclasses:
YAHOO.util.ShouldFail YAHOO.util.ShouldError YAHOO.util.ComparisonFailure YAHOO.util.UnexpectedError YAHOO.util.UnexpectedValue
AssertionError 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.

Constructor

YAHOO.util.AssertionError ( message )
Parameters:
message <String> The message to display when the error occurs.

Properties

name - String

The name of the error that occurred.

Methods

getMessage

String getMessage ( )
Returns a fully formatted error for an assertion failure. This should be overridden by all subclasses to provide specific information.
Returns: String
A string describing the error.

toString

String toString ( )
Returns a string representation of the error.
Returns: String
A string representation of the error.

valueOf

String valueOf ( )
Returns a primitive value version of the error. Same as toString().
Returns: String
A primitive value version of the error.


Copyright © 2007 Yahoo! Inc. All rights reserved.