Clean up which exception is used when a little