class Vips::Error
The ruby-vips8 error class.
Public Class Methods
new(msg = nil)
click to toggle source
@param msg [String] The error message. If this is not supplied, grab
and clear the vips error buffer and use that.
# 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
Public Instance Methods
to_s()
click to toggle source
Pretty-print a {Vips::Error}.
@return [String] The error message
Calls superclass method
# File lib/vips8/error.rb, line 21 def to_s if @details != nil @details else super.to_s end end