add toggleExceptions method