WIP add treated_exceptions support