Exception: Pdfcrowd::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Pdfcrowd::Error
- Defined in:
- lib/pdfcrowd.rb
Overview
Thrown when an error occurs.
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
Instance Method Summary collapse
- #getCode ⇒ Object
- #getMessage ⇒ Object
-
#initialize(error, http_code = nil) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
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
#error ⇒ Object (readonly)
Returns the value of attribute error.
47 48 49 |
# File 'lib/pdfcrowd.rb', line 47 def error @error end |
#http_code ⇒ Object (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
#getCode ⇒ Object
59 60 61 |
# File 'lib/pdfcrowd.rb', line 59 def getCode() @http_code end |
#getMessage ⇒ Object
63 64 65 |
# File 'lib/pdfcrowd.rb', line 63 def getMessage() @error end |
#to_s ⇒ Object
55 56 57 |
# File 'lib/pdfcrowd.rb', line 55 def to_s() @http_code ? "#{@http_code} - #{@error}" : @error end |