cosmit: better exceptions