rewrite the raise exception