When the code trows a parsing exception, is it possible to have this code continue executing? Right now it just shows that there is NumberFormatException and stops executing. Thx.
As written, that's exactly what this bit of code would do: continue on using -1 for the value of mod1, as if no exception had occurred. If you're seeing some other behavior, it's because you're not showing us the real code.
I want the code to use modI=-1 in case of an exception, but why does it stop executing and shows exception on the screen (java.lang.NumberFormatException: For input string: "N/A")? The whole method is too large to be posted here. Thx.
Originally posted by Ulvi Cetin: why does it stop executing and shows exception on the screen (java.lang.NumberFormatException: For input string: "N/A")?
The little bit of code you've shown here won't do that. The NumberFormatException must be coming from another line of code. Look at the stack trace -- is there a line number? Look at the line of code it's calling out.