rewrite exceptions