# Class: MoneroError

## MoneroError(message, code)

Exception when interacting with a Monero wallet or daemon.

## Constructor

#### new MoneroError(message, code)

Constructs the error.

##### Parameters:

Name | Type | Description
--- | --- | ---
`message` | string | is a human-readable message of the error
`code` | int | is the error code (optional)

Source:
  - src/main/js/common/MoneroError.js, line 4

### Methods

#### getCode()

Source:
  - src/main/js/common/MoneroError.js, line 17

#### toString()

Source:
  - src/main/js/common/MoneroError.js, line 21