java::lang::AssertionError Class Reference

Inheritance diagram for java::lang::AssertionError:

Inheritance graph
java::lang::Errorjava::lang::Throwablejava::lang::Object
[legend]
Collaboration diagram for java::lang::AssertionError:

Collaboration graph
java::lang::Errorjava::lang::Throwablejava::lang::Objectjava::lang::Stringjava::lang::Interfacejava::lang::ObjectRefjava::lang::Comparable
[legend]

List of all members.


Detailed Description

Thrown to indicate that an assertion has failed.

The seven one-argument public constructors provided by this class ensure that the assertion error returned by the invocation:

     new AssertionError(expression)
 
has as its detail message the string conversion of expression (as defined in The Java Language Specification, Second Edition, Section 15.18.1.1), regardless of the type of expression.

Version:
1.6, 01/23/03
Since:
JDK1.4

Public Member Functions

 AssertionError (const String &message=nilCString)
 Constructs a new error with the specified detail message.
 AssertionError (const ObjectRef &obj)
 Constructs an AssertionError with its detail message derived from the specified object, which is converted to a string as defined in The Java Language Specification, Second Edition, Section 15.18.1.1.

Constructor & Destructor Documentation

java::lang::AssertionError::AssertionError ( const String message = nilCString  ) 

Constructs a new error with the specified detail message.

The cause is not initialized, and may subsequently be initialized by a call to initCause.

Parameters:
message the detail message. The detail message is saved for later retrieval by the getMessage() method.

java::lang::AssertionError::AssertionError ( const ObjectRef obj  ) 

Constructs an AssertionError with its detail message derived from the specified object, which is converted to a string as defined in The Java Language Specification, Second Edition, Section 15.18.1.1.

If the specified object is an instance of Throwable, it becomes the cause of the newly constructed assertion error.

Parameters:
detailMessage value to be used in constructing detail message
See also:
Throwable::getCause()


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:34 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3