Rupyex.Error exception (Rupyex v0.1.0)

Copy Markdown View Source

A failure raised inside (or around) the interpreter.

:kind says where it came from:

  • :python — an exception raised by the Python code
  • :syntax — the source did not compile
  • :timeout — the call ran past its :timeout and was interrupted
  • :interrupted — the job was aborted by Rupyex.interrupt/1
  • :cancelled — the job was aborted before it started running
  • :conversion — the value could not be represented as an Elixir term
  • :init — the interpreter failed to start
  • :closed — the session is no longer running
  • :panic — the interpreter thread panicked (a RustPython bug)

Summary

Types

kind()

@type kind() ::
  :python
  | :syntax
  | :timeout
  | :interrupted
  | :cancelled
  | :conversion
  | :init
  | :closed
  | :panic

t()

@type t() :: %Rupyex.Error{
  __exception__: true,
  class: String.t(),
  kind: kind(),
  message: String.t(),
  stderr: String.t(),
  stdout: String.t(),
  traceback: String.t() | nil
}