Skip to content

This repository contains a program designed to handle exceptions in file reading and writing operations. The program includes functionalities to read text from a file and write text to a file, with comprehensive exception handling for scenarios such as non-existent files, permission issues.

License

Notifications You must be signed in to change notification settings

yataknemogy/FileReadWriteExceptionHandling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Exception Handling in File Reading and Writing

The program has two functions:

  1. Reading text from a file
  2. Writing text to a file

When reading text from a file, the program should handle the following exceptions:

  • If the file does not exist, display an error message and prompt the user to enter the name of an existing file.
  • If the file cannot be read (e.g., due to lack of permissions), display an error message.

When writing text to a file, the program should also handle exceptions:

  • If the file cannot be created or overwritten, display an error message.
  • If an error occurs during writing, such as insufficient disk space, handle this error.

Implement a menu that allows the user to choose whether to read text from a file, write text to a file, or exit the program.

About

This repository contains a program designed to handle exceptions in file reading and writing operations. The program includes functionalities to read text from a file and write text to a file, with comprehensive exception handling for scenarios such as non-existent files, permission issues.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages