C++ Exception Handling with Examples (Basic to Advanced)
3.3 (6 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
572 students enrolled
Wishlisted Wishlist

Please confirm that you want to add C++ Exception Handling with Examples (Basic to Advanced) to your Wishlist.

Add to Wishlist

C++ Exception Handling with Examples (Basic to Advanced)

Learn how to implement Exception Handling in C++, covering every basic topic in detail with the help of C++ Examples.
3.3 (6 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
572 students enrolled
Created by Anuj Kumar
Last updated 6/2015
English
Curiosity Sale
Current price: $10 Original price: $195 Discount: 95% off
30-Day Money-Back Guarantee
Includes:
  • 2 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understand why Exception Handling was required
  • 9 downloadable C++ examples covered in the course
  • How Exception handling works / mechanism.
  • Use try, catch and throw and implement your own programs.
  • Make your own program covering all topics from Basics to Advanced
View Curriculum
Requirements
  • You should already be familiar with the basic syntax of C++ - functions, control structure, operators and variables.
Description

Want to learn the most typical and important topic in any programming language. In this course you will learn Exception Handling in C++ covering all the basic to advanced topics with the help of great examples along the way.

I will be using Dev C++ as a compiler but you can use any compiler of your choice. Before starting the course you should have at least basic understanding of C++ syntax - operators, functions, control structure.

The course contains 5 section having total of 11 lectures - 2 hours of video content. Apart from that there are 9 C++ files included in the "Downloadable Resource" section for better understanding of its concepts. Also various MCQ's / Quizzes for better understanding of your concepts.

Here's a list of topics covered in the course -

  1. Why there was a need for exception handling.
  2. Basics of Exception Handling.
  3. How Exception handling works / mechanism.
  4. Use of try, catch and throw.
  5. Function that generates exception.
  6. Multiple catch statements.
  7. How to Catch all the exceptions using (...)
  8. Nested exception handling
  9. Restricting / Specifying throw restriction
  10. Re throwing an Exception

And much more along the way...

This topic is highly recommended on the perspective of Interviews for companies or Examination.

Who is the target audience?
  • The course is suitable for beginners in C++ programming language - functions, operators, variables, control structure.
  • Please do not take the course if you have no prior experience in any programming language.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
16 Lectures
01:50:14
+
Introduction
3 Lectures 15:22

A Brief Introduction of the course, about its contents, Prerequisites of the course and knowing whether the course is right for you or not.

Preview 03:41

In this lecture we will be installing Dev C++ for Windows and Code Blocks for Linux and Mac Users. Off course you can use any other compiler of your own. I will be using Dev C++ throughout the course.

Download Dev C++ here - http://www.bloodshed.net/dev/devcpp.html

Download Code Blocks for Mac and Linux Users - http://www.codeblocks.org/downloads/26

Let me know if any of the link is not working.

Installing Dev C++ or Code Blocks
07:00

In this lecture you will learn "why there is a need for Exception Handling." You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Well we need to handle certain exceptions, For example - 10/0 is infinite or not defined. But computer doesn't know this and it generates an error as a result we are not able to run our programs. So we need certain mechanism called "Exception Handling" to handle such thing. But more on that later in the next lecture.

Preview 04:41

How it works?
1 question
+
Basic Exception Handling
3 Lectures 25:37

A brief description of what's inside Section 2 of this course. What topics you should emphasize on and what you will be able to implement at the end of this section.

Preview 01:01

In this lecture, you will learn understand the concept of Exception Handling, i.e, how it works. You will also know about there words which you should get yourself familiar with, i.e., try, catch and throw.

Try is used for handling the exception. Inside try block we have a throw statement which literally throws something. Finally we have catch block which accepts as a parameter the same data type which we have throw.

You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Exception handling mechanism - Use of try, catch, and throw
15:30

In this lecture we will cover another example for Exception Handling. You will again use a try block that throws and integer as a result a catch block that receives an integer (with a formal parameter). Please note - catch Block will always immediately follow try block, no matter what.

You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Another Example on try, catch & throw.
09:06

Basics
1 question
+
Function Generating Exception
3 Lectures 08:47

A brief description of what's inside Section 3 of this course. What topics you should emphasize on and what you will be able to implement at the end of this section.

Preview 00:47

In this lecture you will learn how to create a function that generates an Exception. First we will create a try block, and inside it we will call that function that generates an exception. Inside the function definition we will have a throw statement which will throw an exception. A throw block will be there(obviously - everytime you write a try block, make a catch block immediately) which will catch the exception.

You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Function Generating Exception
06:24

An extra lecture for throw keyword. How we can alter or write it in different ways.

More on throw from previous lecture.
01:36

Basics of Function generating exceptions
1 question
+
Multiple Catch Statements
3 Lectures 18:42

A brief description of what's inside Section 4 of this course. What topics you should emphasize on and what you will be able to implement at the end of this section.

What's inside Section 4 - Introduction
00:56

In this lecture you will learn the concept of "Multiple catch" statements. It is used so that we can catch different types of data types depending on what data type was thrown from the throw statement. For catching any data type whether it is float, integer, character or double(any) we use (...) inside the catch statement as catch(...) which signifies that any it can catch any type of data thrown.

You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Multiple Catch Statement
09:06

Another example for "Multiple catch statements" to help you better understand this concept.

You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Another example - Multiple catch Statements
08:40

Basics of Multiple catch
1 question
+
Advanced Section
4 Lectures 41:46

A brief description of what's inside Section 5 of this course. What topics you should emphasize on and what you will be able to implement at the end of this section as well as at the end of the course.

Preview 02:04

Just like we have nested "if statements", we can also create nested try blocks, i.e., another try block inside a try block.

You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Nested Exception Handling
07:50

Basics
1 question

In this lecture you will learn how can we restrict our compiler to throw only certain data types. Now if you throw any other data type other than that you specified your compiler will stop working, since you now have a function that has restricted to throw only certain data types that you specified.

You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Restricting/Specifying throw restriction
15:17

Up till now we were throwing an exception either inside a try block or inside a function that was called from try block. Now we will learn how to put a throw statement inside a catch block by keyword throw; to rethrow the same exception that was being caught by that catch block.

You can download the C++ file made in the lecture from the "Downloadable Resources" section.

Re throwing an Exception
16:35

Basics of rethrow
1 question
About the Instructor
Anuj Kumar
3.3 Average rating
6 Reviews
572 Students
1 Course
Programmer

Programming is Epic and also my passion. Hello everyone, I am Anuj kumar. I am currently pursuing Computer Science Engineering. I have been programming from the past 3 years in various programming languages such as C, C++, Java. I also have a keen interest in Web Development and Android Development. Technology advances daily, there is a lot that I still need to learn.