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
-
#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.
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
#error ⇒ Object (readonly)
Returns the value of attribute error.
43 44 45 |
# File 'lib/pdfcrowd.rb', line 43 def error @error end |
#http_code ⇒ Object (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_s ⇒ Object
51 52 53 54 |
# File 'lib/pdfcrowd.rb', line 51 def to_s() @http_code ? "#{@http_code} - #{@error}" : @error end |