mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Updated other exception to also be runtime_error type instead.
This commit is contained in:
parent
894792e1e1
commit
06889be239
@ -616,7 +616,7 @@ void doSomethingWithAFile(const char* filename)
|
||||
{
|
||||
FILE* fh = fopen(filename, "r"); // Open the file in read mode
|
||||
if (fh == nullptr)
|
||||
throw std::exception();
|
||||
throw std::runtime_error("Could not open the file.");
|
||||
|
||||
try {
|
||||
doSomethingWithTheFile(fh);
|
||||
|
Loading…
Reference in New Issue
Block a user