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

Skip to content

Commit d9c2a6e

Browse files
committed
Update exception handling in code files
1 parent 65922ea commit d9c2a6e

29 files changed

Lines changed: 29 additions & 29 deletions

code/00_base_code.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int main() {
5151

5252
try {
5353
app.run();
54-
} catch (const std::runtime_error& e) {
54+
} catch (const std::exception& e) {
5555
std::cerr << e.what() << std::endl;
5656
return EXIT_FAILURE;
5757
}

code/01_instance_creation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ int main() {
8282

8383
try {
8484
app.run();
85-
} catch (const std::runtime_error& e) {
85+
} catch (const std::exception& e) {
8686
std::cerr << e.what() << std::endl;
8787
return EXIT_FAILURE;
8888
}

code/02_validation_layers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ int main() {
180180

181181
try {
182182
app.run();
183-
} catch (const std::runtime_error& e) {
183+
} catch (const std::exception& e) {
184184
std::cerr << e.what() << std::endl;
185185
return EXIT_FAILURE;
186186
}

code/03_physical_device_selection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ int main() {
245245

246246
try {
247247
app.run();
248-
} catch (const std::runtime_error& e) {
248+
} catch (const std::exception& e) {
249249
std::cerr << e.what() << std::endl;
250250
return EXIT_FAILURE;
251251
}

code/04_logical_device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ int main() {
288288

289289
try {
290290
app.run();
291-
} catch (const std::runtime_error& e) {
291+
} catch (const std::exception& e) {
292292
std::cerr << e.what() << std::endl;
293293
return EXIT_FAILURE;
294294
}

code/05_window_surface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ int main() {
313313

314314
try {
315315
app.run();
316-
} catch (const std::runtime_error& e) {
316+
} catch (const std::exception& e) {
317317
std::cerr << e.what() << std::endl;
318318
return EXIT_FAILURE;
319319
}

code/06_swap_chain_creation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ int main() {
474474

475475
try {
476476
app.run();
477-
} catch (const std::runtime_error& e) {
477+
} catch (const std::exception& e) {
478478
std::cerr << e.what() << std::endl;
479479
return EXIT_FAILURE;
480480
}

code/07_image_views.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ int main() {
505505

506506
try {
507507
app.run();
508-
} catch (const std::runtime_error& e) {
508+
} catch (const std::exception& e) {
509509
std::cerr << e.what() << std::endl;
510510
return EXIT_FAILURE;
511511
}

code/08_graphics_pipeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ int main() {
510510

511511
try {
512512
app.run();
513-
} catch (const std::runtime_error& e) {
513+
} catch (const std::exception& e) {
514514
std::cerr << e.what() << std::endl;
515515
return EXIT_FAILURE;
516516
}

code/09_shader_modules.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ int main() {
564564

565565
try {
566566
app.run();
567-
} catch (const std::runtime_error& e) {
567+
} catch (const std::exception& e) {
568568
std::cerr << e.what() << std::endl;
569569
return EXIT_FAILURE;
570570
}

0 commit comments

Comments
 (0)