I have just completed two searches in the history on StringtoValue and DataFormatException. I looked at these in the API and required more information so I went to history but unfortunately it returned no results.
Could someone suggest where to look to find out more about these?
Should I be using DataFormatException instead of the Parse Exception?
Are you considering calling existing methods that might throw these exceptions? Or are you considering extending these exceptions in your own classes?
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Joined: Oct 04, 2004
marc and Paul,
Firstly, thank you for responding to my thread.
I have actually worked out the Exception to use so I have no problems now.
However, I would still be interest on when and what these are for?
I was originally having a date format of four digits. The date was a String (it had to be as one came in as 0181 and zero is not seen as an integer, instead it was hex as it started with zero).
I was then using the ParseException to change the string to a date format.
My correct code in the end was as follows:
Again, thank you for your help!
Joined: Apr 10, 2005
I'm not sure about the DataFormatException, it's in the Zip package so I guess it has something to do with files within zipfiles having the wrong format. The ParseException however in general occurs when you try to convert a string literal to a primitive with one of the wrapper classes.