now uses the exit code

changed all the exception from Exception to RuntimeException