handle exception and produce error for illegal code point