[フレーム]

Exception: Vips::Error

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

Overview

The ruby-vips error class.

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ Error

Returns a new instance of Error.

Parameters:

  • msg (String) (defaults to: nil)

    The error message. If this is not supplied, grab and clear the vips error buffer and use that.

637
638
639
640
641
642
643
644
645
646
# File 'lib/vips.rb', line 637
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 .

Returns:

  • (String)

    The error message

651
652
653
654
655
656
657
# File 'lib/vips.rb', line 651
def to_s
 if !@details.nil?
 @details
 else
 super.to_s
 end
end

AltStyle によって変換されたページ (->オリジナル) /