Exception: Vips::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/vips.rb

Overview

The ruby-vips error class.

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ Error


487
488
489
490
491
492
493
494
495
496
# File 'lib/vips.rb', line 487

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

Instance Method Details

#to_sString

Pretty-print a Vips::Error.


501
502
503
504
505
506
507
# File 'lib/vips.rb', line 501

def to_s
  if @details != nil
    @details
  else
    super.to_s
  end
end