---
title: "Exception"
description: "Exception prototype."
canonical_url: "https://www.zeyos.com/zymba/ref/exception"
markdown_url: "https://www.zeyos.com/ai/guide/zymba/ref/exception.md"
section: "zymba-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/zymbaref.json"
source_sha256: "05a361c6ddc32e74f4a6dc16fd06f218210ff1b7ce57f26ca1994bfffc407915"
---

# Exception

## Exception

```
object @Exception(@Base) {
	construct(string $message) {}
	countTraces(): int {}
	getInitialTrace(): object {}
	getInternalState(): object {}
	getMessage(): string {}
	getSummary(): string {}
	getTracesAsString(): string {}
	listTraces(): object {}
	toString(): string {}
}
```

**Exception prototype.**

### Prototype

**[Base](#)**

## Methods


### `$this.construct()`


```code
$this.construct(string $message): void
```

##### Parameters

| Name | Type | Value | Default |
| --- | --- | --- | --- |
| message | `string`  |  | "" |




### `$this.countTraces()`


```code
$this.countTraces(): int
```

##### Returns

| Type | Value |
| --- | ---  |
| `int` |  |




### `$this.getInitialTrace()`


```code
$this.getInitialTrace(): object
```

##### Returns

| Type | Value |
| --- | ---  |
| `object` | ["filename": ..., "line": ..., "site": ..., "function": ..., "params": ...] |
| `null` |  |




### `$this.getInternalState()`


```code
$this.getInternalState(): object
```

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [name: value, ...] |
| `null` |  |




### `$this.getMessage()`


```code
$this.getMessage(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.getSummary()`


```code
$this.getSummary(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.getTracesAsString()`


```code
$this.getTracesAsString(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |




### `$this.listTraces()`


```code
$this.listTraces(): object
```

##### Returns

| Type | Value |
| --- | ---  |
| `object` | [["filename": ..., "line": ..., "site": ..., "function": ..., "params": ...], ...] |




### `$this.toString()`


```code
$this.toString(): string
```

##### Returns

| Type | Value |
| --- | ---  |
| `string` |  |
