replace remaining assertion calls with direct exceptions