BadRegistry extends Exception
Exception to be thrown when the unit registry encounters an issue reading & writing units.
Tags
Table of Contents
- ERROR_DUPLICATE_UNIT = 2
- ERROR_UNKNOWN_UNIT = 1
- duplicate() : Exception
- Create a new exception for duplicate units.
- unknown() : self|Exception
- Throw a new exception for an unknown type of unit.
Constants
ERROR_DUPLICATE_UNIT
public
mixed
ERROR_DUPLICATE_UNIT
= 2
ERROR_UNKNOWN_UNIT
public
mixed
ERROR_UNKNOWN_UNIT
= 1
Methods
duplicate()
Create a new exception for duplicate units.
public
static duplicate(string $symbol[, Exception $previous = null ]) : Exception
Parameters
- $symbol : string
-
The symbol that is offending as a duplicate.
- $previous : Exception = null
Return values
Exception —unknown()
Throw a new exception for an unknown type of unit.
public
static unknown(string $unit[, Exception $previous = null ]) : self|Exception
Parameters
- $unit : string
-
The type of unit that caused the error.
- $previous : Exception = null