Exception: XposedOrNot::APIError

Inherits:
XposedOrNotError show all
Defined in:
lib/xposedornot/errors.rb

Overview

Raised when the API returns an unexpected error response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil) ⇒ APIError

Returns a new instance of APIError.

Parameters:

  • message (String) (defaults to: nil)

    the error message

  • status (Integer, nil) (defaults to: nil)

    the HTTP status code



29
30
31
32
# File 'lib/xposedornot/errors.rb', line 29

def initialize(message = nil, status: nil)
  @status = status
  super(message)
end

Instance Attribute Details

#statusInteger? (readonly)

Returns the HTTP status code.

Returns:

  • (Integer, nil)

    the HTTP status code



25
26
27
# File 'lib/xposedornot/errors.rb', line 25

def status
  @status
end