on runtime error, throw Exception instead of System.exit(-1)