Exception: Pdfcrowd::Error

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

Overview

Thrown when an error occurs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, http_code = nil) ⇒ Error

Returns a new instance of Error.



45
46
47
48
49
# File 'lib/pdfcrowd.rb', line 45

def initialize(error, http_code=nil)
  super()
  @http_code = http_code
    @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



43
44
45
# File 'lib/pdfcrowd.rb', line 43

def error
  @error
end

#http_codeObject (readonly)

Returns the value of attribute http_code.



43
44
45
# File 'lib/pdfcrowd.rb', line 43

def http_code
  @http_code
end

Instance Method Details

#to_sObject



51
52
53
54
# File 'lib/pdfcrowd.rb', line 51

def to_s()

  @http_code ?  "#{@http_code} - #{@error}" : @error
end