It is probably better to throw an exception instead of calling exit here.