File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No exception thrown

 
Shailesh Phatak
Ranch Hand
Posts: 64
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello EveryOne,
I read in k & b book that if we don't make a directory using mkdir() function and add a file in it then it will throw an exception But the below code executes fine. Though it doesn't output anything..

This code doesn't throw any exception but according to book it have to throw.
Note: There is no Directory named First Directory in my pC
 
Henry Wong
author
Marshal
Pie
Posts: 20828
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shailesh Phatak wrote:This code doesn't throw any exception but according to book it have to throw.
Note: There is no Directory named First Directory in my pC


How do you know it doesn't throw any exceptions? Any exception thrown will be quietly caught and ignored in your code.

Or are you saying that you were able to write out the sentence, read it back, and print it?

Henry
 
Shailesh Phatak
Ranch Hand
Posts: 64
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops!! I have to test it again!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic