aspose file tools*
The moose likes Java in General and the fly likes ParseException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "ParseException" Watch "ParseException" New topic
Author

ParseException

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i'm testing this method:

with this test:

I've 2 Qs:
1) in ParseException's constructor, it says:


thanks in advance
[ January 07, 2005: Message edited by: miguel lisboa ]

java amateur
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Miguel,

I don't see any questions here. What did you want to ask?


[Jess in Action][AskingGoodQuestions]
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281

when i edited i also deleted Qs...
Q #1 how can i use the 2nd param from parseException constructor? looks like any int will do the job...

Q#2 is it correct to set to null objs i dont need any more, like i did?
thanks
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

#1: The only purpose of this parameter is to provide a return value for the ParseException.getErrorOffset() method. That method just exists to provide informaion to code that catches the exception about where the error occurred. In your case, there'e no obvious way to get a sensible value, so I'd just use "0", meaning the beginning. Using any other value would be misleading.

#2: It's not incorrect, but there's little point -- the variable goes out of scope on the next line, which is pretty much the same thing.
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
#2: It's not incorrect, but there's little point -- the variable goes out of scope on the next line, which is pretty much the same thing.

of course
thanks a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ParseException