Exception: Ignis::UnsupportedDTypeError

Inherits:
Error
  • Object
show all
Defined in:
lib/nvruby/errors.rb

Overview

Raised when data type is not supported

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dtype, operation: nil) ⇒ UnsupportedDTypeError

Returns a new instance of UnsupportedDTypeError.

Parameters:

  • dtype (Symbol)

    The unsupported data type

  • operation (String, nil) (defaults to: nil)

    The operation that doesn’t support this dtype



209
210
211
212
213
214
# File 'lib/nvruby/errors.rb', line 209

def initialize(dtype, operation: nil)
  @dtype = dtype
  message = "Unsupported data type: #{dtype}"
  message += " for operation #{operation}" if operation
  super(message)
end

Instance Attribute Details

#dtypeSymbol (readonly)

Returns The unsupported dtype.

Returns:

  • (Symbol)

    The unsupported dtype



205
206
207
# File 'lib/nvruby/errors.rb', line 205

def dtype
  @dtype
end