Exception: Vips::Error

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

Instance Method Summary (collapse)

Constructor Details

- (Error) initialize(msg = nil)

The ruby-vips8 error class.

Parameters:

  • msg (String) (defaults to: nil)

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



9
10
11
12
13
14
15
16
17
18
# File 'lib/vips8/error.rb', line 9

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

- (Object) to_s



20
21
22
23
24
25
26
# File 'lib/vips8/error.rb', line 20

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