exception - Java Stop Script Continuation Without System.exit(1); -
i have program , catching error. need program stop , stay idle if there exception.
i have this:
// try parse integer make sure it's integer. try { integer.parseint(celsiustxtfield.gettext()); } // catch if it's not integer , murder user being stupid. should know temperature consists of numbers , not letters. catch(numberformatexception e) { joptionpane.showmessagedialog(null, "you did not submit number. please try again.", "general error - error #2", joptionpane.error_message); }
but, though shows error message, still continues on script.
this simple, i'm new java, please excuse not knowing.
i found way this.
move under try, , way, catch last thing, there's nothing else executed.
Comments
Post a Comment