View Source Icon.Schema.Error (ICON 2.0 SDK v0.1.0)

This module defines an ICON 2.0 error.

Link to this section Summary

Types

Domain of the error.

Errors.

SCORE errors.

t()

An error.

Functions

Creates a new error given a schema_or_map_or_keyword.

Link to this section Types

Specs

domain() :: :request | :contract | :internal

Domain of the error.

Specs

error() ::
  :parse_error
  | :invalid_request
  | :method_not_found
  | :invalid_params
  | :internal_error
  | :server_error
  | :system_error
  | :pool_overflow
  | :pending
  | :executing
  | :not_found
  | :lack_of_resource
  | :timeout
  | :system_timeout
  | score_error()

Errors.

Specs

score_error() ::
  :score_unknown_failure
  | :score_contract_not_found
  | :score_method_not_found
  | :score_method_not_payable
  | :score_illegal_format
  | :score_invalid_parameter
  | :score_invalid_instance
  | :score_invalid_container_access
  | :score_access_denied
  | :score_out_of_step
  | :score_out_of_balance
  | :score_timeout_error
  | :score_stack_overflow
  | :score_skip_transaction
  | :score_reverted

SCORE errors.

Specs

t() :: %Icon.Schema.Error{
  code: integer(),
  data: any(),
  domain: domain(),
  message: binary(),
  reason: error()
}

An error.

Link to this section Functions

Link to this function

%Icon.Schema.Error{}

View Source (struct)

An error.

Link to this function

new(schema_or_map_or_keyword)

View Source

Specs

new(Icon.Schema.state() | map() | keyword()) :: t()

Creates a new error given a schema_or_map_or_keyword.