class adapter for exceptions