[ale] OT: java filereader question

Denny Chambers dchambers at bugfixer.net
Thu Apr 8 22:08:35 EDT 2004


The javadocs is the first place to look, they will tell you what methods 
throw exceptions. Also here is breif tutorial that may help some: 
http://java.sun.com/docs/books/tutorial/essential/exceptions/handling.html

J.M. Taylor wrote:

>Excellent. That works beautifully, or at least, it compiles. :)
>Where can I read something that explains decently what's going on with 
>exceptions, do you know?  It's certainly not a concept I'm familiar with, 
>and everything I read just says "do this to catch an exception" which 
>doesn't tell me _what_ I'm trying to do, or why, or what's actually going 
>on when I do it.
>
>Thank you thank you thank you
>jenn
>
>
>On Thu, 8 Apr 2004, Denny Chambers wrote:
>
>  
>
>>BTW, the reason it working in main, is because main say it will throw 
>>java.io.IOException, so you are not required to do the try/catch if your 
>>going to throw it up a layer. You have also add the "throws 
>>java.io.IOException" clause to doMergeSort and everything would have 
>>been fine.
>>
>>Denny Chambers wrote:
>>
>>    
>>
>>>ahh ok i see
>>>
>>>try{
>>>FileReader fr = new FileReader("file1");
>>>}
>>>catch(FileNotFoundException fnfe){
>>>//handle exception
>>>}
>>>      
>>>
>
>
>_______________________________________________
>Ale mailing list
>Ale at ale.org
>http://www.ale.org/mailman/listinfo/ale
>
>
>  
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3190 bytes
Desc: S/MIME Cryptographic Signature




More information about the Ale mailing list