Introduce new exception types: LogicError, IllegalOperation,
InvalidArgument, and DoubleDefinition.
closes #61