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.



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

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.



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

def error
  @error
end

#http_codeObject (readonly)

Returns the value of attribute http_code.



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

def http_code
  @http_code
end

Instance Method Details

#getCodeObject



59
60
61
# File 'lib/pdfcrowd.rb', line 59

def getCode()
    @http_code
end

#getMessageObject



63
64
65
# File 'lib/pdfcrowd.rb', line 63

def getMessage()
    @error
end

#to_sObject



55
56
57
# File 'lib/pdfcrowd.rb', line 55

def to_s()
  @http_code ?  "#{@http_code} - #{@error}" : @error
end