Class: OpenCV::Std::Exception

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ropencv/ropencv_types.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


78683
78684
78685
78686
78687
78688
78689
78690
# File 'lib/ropencv/ropencv_types.rb', line 78683

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(ExceptionStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.nullObject

returns a null pointer to the object



78679
78680
78681
# File 'lib/ropencv/ropencv_types.rb', line 78679

def self.null
    new(ExceptionStruct.new)
end

Instance Method Details

#to_sObject

converts Exception into a string by crawling through all its attributes



78756
78757
78758
# File 'lib/ropencv/ropencv_types.rb', line 78756

def to_s
    "#<std::exception >"
end