class Vips::Error

The ruby-vips 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/vips.rb, line 542
def initialize msg = nil
  if msg
    @details = msg
  elsif Vips::vips_error_buffer != ""
    @details = Vips::vips_error_buffer
    Vips::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/vips.rb, line 556
def to_s
  if @details != nil
    @details
  else
    super.to_s
  end
end