YUI recommends YUI3.

YUI 2 has been deprecated since 2011. This site acts as an archive for files and documentation.

This documentation is no longer maintained.

Yahoo! UI Library

yuitest  2.9.0

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

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.


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


name - String

The name of the error that occurred.



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.


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

Copyright © 2011 Yahoo! Inc. All rights reserved.