Can we raise a named exception here instead of calling exit?