# Ovok js exception

Canonical page: https://docs.ovok.com/flutter-sdk/reference/ovok_flutter/ovok-js-exception

{/* Generated by scripts/generate_reference.dart; do not edit. */}

## OvokJsException [#ovokjsexception]

```dart
class OvokJsException implements Exception
```

A call that failed inside the embedded JavaScript engine.

### Constructors [#constructors]

#### OvokJsException.new [#ovokjsexceptionnew]

```dart
OvokJsException({
  required String name,
  required String message,
  required String stack,
})
```

Creates an exception with the JavaScript error's [`name`](#ovokjsexceptionname), [`message`](#ovokjsexceptionmessage) and [`stack`](#ovokjsexceptionstack).

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `name` | `String` | required named |  |
| `message` | `String` | required named |  |
| `stack` | `String` | required named |  |

#### OvokJsException.fromJson [#ovokjsexceptionfromjson]

```dart
OvokJsException.fromJson(Map<String, dynamic> json)
```

Reads the `{name, message, stack}` object the JavaScript side reports.

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `json` | `Map<String, dynamic>` | positional |  |

### Properties [#properties]

#### OvokJsException.name [#ovokjsexceptionname]

```dart
final String name
```

The JavaScript error class name, such as `OvokNotFoundError`.

#### OvokJsException.message [#ovokjsexceptionmessage]

```dart
final String message
```

The JavaScript error message.

#### OvokJsException.stack [#ovokjsexceptionstack]

```dart
final String stack
```

The JavaScript stack trace.
