rewrite exception in new style