Exception: Vips::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Vips::Error
- Defined in:
- lib/vips8/error.rb
Overview
The ruby-vips8 error class.
Instance Method Summary collapse
-
#initialize(msg = nil) ⇒ Error
constructor
A new instance of Error.
-
#to_s ⇒ String
Pretty-print a Error.
Constructor Details
permalink #initialize(msg = nil) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vips8/error.rb', line 7 def initialize(msg = nil) if msg @details = msg elsif Vips::error_buffer != "" @details = Vips::error_buffer Vips::error_clear else @details = nil end end |
Instance Method Details
permalink #to_s ⇒ String
Pretty-print a Vips::Error.
21 22 23 24 25 26 27 |
# File 'lib/vips8/error.rb', line 21 def to_s if @details != nil @details else super.to_s end end |