Exception: Pinterest::Errors::BaseError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/pinterest/errors.rb

Overview

The base error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, reason, env) ⇒ BaseError

Creates a new error.

Parameters:

  • code (Fixnum)

    The error code.

  • reason (String)

    The error message.

  • env (Env)

    The environment.



30
31
32
33
34
35
# File 'lib/pinterest/errors.rb', line 30

def initialize(code, reason, env)
  super("[#{code}] #{reason}")
  @code = code
  @reason = reason
  @env = env
end

Instance Attribute Details

#codeObject

Returns the value of attribute code



23
24
25
# File 'lib/pinterest/errors.rb', line 23

def code
  @code
end

#envObject

Returns the value of attribute env



23
24
25
# File 'lib/pinterest/errors.rb', line 23

def env
  @env
end

#reasonObject

Returns the value of attribute reason



23
24
25
# File 'lib/pinterest/errors.rb', line 23

def reason
  @reason
end