replace 'Exception' with more specific Exception classes