# Yahoo! UI Library

### yuitest 2.8.0r4

Yahoo! UI Library > yuitest > YAHOO.util.AssertionError
Search:
Filters Show Private Show Protected Show Deprecated

## 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.

Copyright © 2009 Yahoo! Inc. All rights reserved.