Exception: UnitMeasurements::MissingPrimitiveUnitError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/unit_measurements/errors/missing_primitive_unit_error.rb

Overview

The UnitMeasurements::MissingPrimitiveUnitError class represents an error that occurs when the primitive unit is not set for a unit group.

This error is raised when a user attempts to convert a measurement to the primitive unit of a unit group that does not have a primitive unit defined.

See Also:

Author:

Since:

  • 5.12.0

Instance Method Summary collapse

Constructor Details

#initializeMissingPrimitiveUnitError

Initializes a new MissingPrimitiveUnitError instance.

Author:

Since:

  • 5.12.0



20
21
22
# File 'lib/unit_measurements/errors/missing_primitive_unit_error.rb', line 20

def initialize
  super("The primitive unit is not set for the unit group.")
end