# assert.AssertionError

> Indicates the failure of an assertion. All errors thrown by the [assert](https://titaniumsdk.com/docs/sdk/assert.md) module will be instances of the `AssertionError` class.

- Source: https://titaniumsdk.com/docs/sdk/12.6.2/assert.AssertionError
- Titanium SDK version: 12.6.2
- Kind: pseudo
- Platforms: Android, iPhone, iPad, macOS
- Extends: Error
- Inheritance: Error

## Properties

### actual

- Type: any
- Platforms: Android, iPhone, iPad, macOS

Set to the actual argument for methods such as `assert.strictEqual()`.

### code

- Type: String
- Platforms: Android, iPhone, iPad, macOS

Value is always `ERR_ASSERTION` to show that the error is an assertion error.

### expected

- Type: any
- Platforms: Android, iPhone, iPad, macOS

Set to the expected value for methods such as `assert.strictEqual()`.

### generatedMessage

- Type: Boolean
- Platforms: Android, iPhone, iPad, macOS

Indicates if the message was auto-generated (`true`) or not.

### operator

- Type: String
- Platforms: Android, iPhone, iPad, macOS

Set to the passed in operator value.

## Methods

### constructor

- Platforms: Android, iPhone, iPad, macOS

A subclass of `Error` that indicates the failure of an assertion.

Parameters:

- `options` (assert.AssertionError.options, optional): options

Returns: assert.AssertionError

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

