ThrowError simplified