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

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

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

Domain of the error.

@type 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.

@type 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.

@type 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
@spec new(Icon.Schema.state() | map() | keyword()) :: t()

Creates a new error given a schema_or_map_or_keyword.