Remove incorrect use of an exception