Opened 13 years ago

Closed 13 years ago

#253 closed defect (fixed)

catch NumberFormatException's that use commas

Reported by: Kevin Milner Owned by: Peter Powers
Priority: major Milestone: OpenSHA 1.2
Component: commons Version:
Keywords: Cc:

Description

We get a fair amount of bug reports like this:

java.lang.NumberFormatException: For input string: "0,00010"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
	at java.lang.Double.parseDouble(Double.java:510)
	at org.opensha.sha.gui.infoTools.IMT_Info.getDefaultHazardCurve(IMT_Info.java:107)
	at org.opensha.sha.gui.HazardSpectrumLocalModeApplication.initX_Values(HazardSpectrumLocalModeApplication.java:646)
	at org.opensha.sha.gui.HazardSpectrumLocalModeApplication.computeHazardCurve(HazardSpectrumLocalModeApplication.java:305)
	at org.opensha.sha.gui.HazardCurveServerModeApplication.run(HazardCurveServerModeApplication.java:943)
	at java.lang.Thread.run(Thread.java:680)

Ideally we'd support localized number formats, but in the meantime we should notify the user when this type of error is detected. This could be done in BugWindow?, and could be done in conjunction with #141: Modify BugWindow? to catch firewall related exceptions and display appropriate information.

Change History (2)

comment:1 Changed 13 years ago by Kevin Milner

done in [7770]...although that particular exception was a real bug (see #176)

comment:2 Changed 13 years ago by Kevin Milner

Resolution: fixed
Status: newclosed

forgot to close this...see above comment

Note: See TracTickets for help on using tickets.