remove const in error constructors