C# Tutorial for Beginners #29 - Error Handling with try, catch, and finally

Channel:
Subscribers:
8,960
Published on ● Video Link: https://www.youtube.com/watch?v=km-cy--IsQg



Duration: 11:25
351 views
32


Protect yourself from your users and learn basic error handling! Learn to use about the try catch finally statement, generic and specific exception handling and exception messages, and use these skills to fortify your code!

At 5:14 I say finally will run "no matter what happens", which is rarely the case in programming. =) If you exit your application in your try/catch statements, or if you cause a new unhandled exception in your catch statement, your application WILL crash before finally is run!

Please let me know if you have any questions. Happy coding!

Chapters:
0:00 Introduction
0:17 What is an Unhandled Exception?
1:22 try catch Statement
5:04 finally Statement
6:04 Catching Specific Exceptions
8:17 Using Exception Messages
10:08 Alternative catch Formatting
11:03 Next Up







Tags:
oop
c#
error handling
try catch
try catch finally
exceptions