Turned exception into assertion