Little help needed on the challenge


Hi every one, I think I have my code ready and would like to simulate an error writing and/or reading from the file, however I’m not sure exactly how to cause an error so that my error message can be displayed.

Any help on how to create the error is much appreciated.


For reading from a file: find the file and edit to corrupt.

For writing to a file; this is a bit tough. But you can try this: use a read-only USB device and try saving to it.


Thanks Ibex10, yes corruption is working but my error message is not :frowning:

Back to the drawing board.


It is working, I tried writing out on a usb thumb drive, and while it was writing I yanked it out.

Ya I know, its not good to do that, but I just couldn’t find an easier way.

Any how thanks for all the great tips