summaryrefslogtreecommitdiffhomepage
path: root/c++.html.markdown
diff options
context:
space:
mode:
authorAdam <adamwheins@gmail.com>2015-06-02 19:14:52 -0400
committerAdam <adamwheins@gmail.com>2015-06-02 19:14:52 -0400
commit06889be239622266d9c36c750f7ee755ccdae05d (patch)
tree9003bbdc8fc93dd0cc83d8e0664fa14a64e3bcfd /c++.html.markdown
parent894792e1e17173823a5d50de24439427c69d63f4 (diff)
Updated other exception to also be runtime_error type instead.
Diffstat (limited to 'c++.html.markdown')
-rw-r--r--c++.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/c++.html.markdown b/c++.html.markdown
index 6f4d2959..ff2a98fd 100644
--- a/c++.html.markdown
+++ b/c++.html.markdown
@@ -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);