change raised error type