Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3e2a6d

Browse files
authored
Update 00_Base_code.md
Added explanation of std::exception usage
1 parent f5532d3 commit f3e2a6d

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

03_Drawing_a_triangle/00_Setup/00_Base_code.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ Once the window is closed and `mainLoop` returns, we'll make sure to deallocate
6363
the resources we've used in the `cleanup` function.
6464

6565
If any kind of fatal error occurs during execution then we'll throw a
66-
`std::exception` exception with a descriptive message, which will propagate
67-
back to the `main` function and be printed to the command prompt. One example of
68-
an error that we will deal with soon is finding out that a certain required
69-
extension is not supported.
66+
`std::runtime_error` exception with a descriptive message, which will propagate
67+
back to the `main` function and be printed to the command prompt. To handle
68+
a variety of standard exception types as well, we catch `std::exception` by
69+
refference. One example of an error that we will deal with soon is finding
70+
out that a certain required extension is not supported.
7071

7172
Roughly every chapter that follows after this one will add one new function that
7273
will be called from `initVulkan` and one or more new Vulkan objects to the

0 commit comments

Comments
 (0)