DimensionException

Exception thrown when operating on two units that are not interconvertible.

Constructors

this
this(string msg, Dimensions thisDim, Dimensions otherDim, string file, size_t line, Throwable next)
Undocumented in source.

Members

Mixins

__anonymous
mixin basicExceptionCtors
Undocumented in source.

Variables

otherDim
Dimensions otherDim;

Holds the dimensions of the eventual other operand

thisDim
Dimensions thisDim;

Holds the dimensions of the quantity currently operated on

Examples

import std.exception : assertThrown;

enum meter = unit!double("L");
enum second = unit!double("T");
assertThrown!DimensionException(meter + second);

Meta