Exception: PolyLingo::PolyLingoError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/polylingo/errors.rb

Overview

Base error for all PolyLingo API failures.

Direct Known Subclasses

AuthError, JobFailedError, RateLimitError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, error, message) ⇒ PolyLingoError

Returns a new instance of PolyLingoError.



8
9
10
11
12
# File 'lib/polylingo/errors.rb', line 8

def initialize(status, error, message)
  super(message)
  @status = status
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



6
7
8
# File 'lib/polylingo/errors.rb', line 6

def error
  @error
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/polylingo/errors.rb', line 6

def status
  @status
end