Issue #12: allow constraints on thrown exceptions.