添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
[Android.Runtime.Register("java/lang/AssertionError", DoNotGenerateAcw=true)]
public class AssertionError : Java.Lang.Error
[<Android.Runtime.Register("java/lang/AssertionError", DoNotGenerateAcw=true)>]
type AssertionError = class
    inherit Error
Inheritance
AssertionError

Remarks

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(<i>expression</i>)

has as its detail message the string conversion of expression (as defined in section {

Added in 1.4.

Java documentation for java.lang.AssertionError.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructs an AssertionError with its detail message derived from the specified boolean, which is converted to a string as defined in section {

Constructs an AssertionError with its detail message derived from the specified char, which is converted to a string as defined in section {

Constructs an AssertionError with its detail message derived from the specified double, which is converted to a string as defined in section {

Constructs an AssertionError with its detail message derived from the specified int, which is converted to a string as defined in section {

Constructs an AssertionError with its detail message derived from the specified long, which is converted to a string as defined in section {

Constructs an AssertionError with its detail message derived from the specified object, which is converted to a string as defined in section {

Constructs an AssertionError with its detail message derived from the specified float, which is converted to a string as defined in section {

Appends the specified exception to the exceptions that were suppressed in order to deliver this exception.

(Inherited from Throwable)

Provides programmatic access to the stack trace information printed by #printStackTrace().

(Inherited from Throwable)

Returns an array containing all of the exceptions that were suppressed, typically by the try-with-resources statement, in order to deliver this exception.

(Inherited from Throwable)

Sets the stack trace elements that will be returned by #getStackTrace() and printed by #printStackTrace() and related methods.

(Inherited from Throwable)