Exception handling in C++ (How to handle errors in your program?)

  Рет қаралды 96,794

CodeBeauty

CodeBeauty

Күн бұрын

📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.
Download Visual Assist here: bit.ly/WT-CB
I use it to enhance the performance, features, and support for C, C#, and C++ development in Visual Studio.
Download Ultra Edit here: bit.ly/UE_CB
It is a powerful, secure text editor designed specifically for programmers.
An exception in C++ usually represents an error (exceptional situation) that can happen during the execution of our program.
We use exception handling in order to handle those errors that can happen during the execution of our program.
In this video, I'll teach you how to handle errors in your program and how to work with exceptions on a real-life example.
You'll learn about keywords that are used to work with exceptions: try, catch and throw.
You'll also learn about different types of exception handlers and about default exception handler.
🎁 Create Modern Apps, 5x faster, with less code, Download FREE C++Builder Trial: bit.ly/CppBuilderFree
☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. Use the link to make a contribution: bit.ly/CodeBeauty_BuyMeACoffee
However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
Contents:
00:00 - What will you learn in this course?
02:03 - What are exceptions
08:36 - Throwing exceptions, throw keyword
11:00 - Fixing application crash with try-catch, handling exceptions
16:00 - Default exception handler
21:13 - Summary - C ++ exceptions explained in 2 minutes
Try building these apps:
Quiz app - bit.ly/MyQuizAppHelp
ATM app - bit.ly/AtmAppHelp
To-Do list app - bit.ly/ToDoAppHelp
Learn about classes and Object-oriented programming: bit.ly/Cpp_OOP_Playlist
Tag me on you Instagram stories:
Instagram 📸 - / truecodebeauty
Twitter 🐦- / truecodebeauty

Пікірлер: 285
@CodeBeauty
@CodeBeauty 3 жыл бұрын
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook 🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time! 💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10). Use it quickly, because it will be available for a limited time.
@abdullahfaisal1265
@abdullahfaisal1265 Жыл бұрын
Hi saldina, can you please share the code in your pinned comment as a github link or as a txt message it really helps before the evalution. Thank you for lessons.
@General_Boo
@General_Boo 3 жыл бұрын
PLEASE never delete your channel/videos!! Your content is so useful
@CodeBeauty
@CodeBeauty 3 жыл бұрын
I won't delete it. 😃 I'm hoping to reach even more people and help them learn programming. Thank you! 💜
@spencerignatescue158
@spencerignatescue158 Жыл бұрын
Ah , I can't tell if your just simping or if this is meant to be sarcastic .
@mr.erikchun5863
@mr.erikchun5863 Жыл бұрын
@@spencerignatescue158 the lonely virgin calling someone a simp. Smh
@OCEAN-fc9wl
@OCEAN-fc9wl 2 жыл бұрын
This channel is perfect for learning C++ in an organic and simple way.
@fachriyasir661
@fachriyasir661 3 жыл бұрын
Hi Saldina, Thank you for spending your time creating video about C++. I'm not a CS student and not really good at programming but you help me pass C++ class. Now I also start to get interested to programming. I feel blessed that I found your channel, so please keep making videos like this:))
@alexandruteodor3585
@alexandruteodor3585 3 жыл бұрын
This tutorial is exceptional! :)
@CodeBeauty
@CodeBeauty 3 жыл бұрын
😁😁
@anonymousfan9703
@anonymousfan9703 2 жыл бұрын
@@CodeBeauty I love you
@umairawan3938
@umairawan3938 3 жыл бұрын
Saldina is a great teacher ❤️
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Thank you UMAIR AWAN! 💜💜
@Javier-uh7mb
@Javier-uh7mb 3 жыл бұрын
someone is in love with their teacher 🙊
@multiplier007
@multiplier007 3 жыл бұрын
You have got amazing teaching skills. You are the best than the teachers in university
@CodeBeauty
@CodeBeauty 3 жыл бұрын
That is so nice to hear! Thank you very much! 💜
@GhanBuri666
@GhanBuri666 2 жыл бұрын
I love listening to you because you are explaining everything in the easiest possible way, but also you are speaking very clearly and have nice voice!
@lukaadamovic8314
@lukaadamovic8314 4 ай бұрын
Thank you very much Saldina. The handing of these exceptions is indeed very very VERY useful and I am truly happy that I have learned so much about this topic. Greetings from Brazil!!!!!!!!!
@rudrashiva
@rudrashiva 3 жыл бұрын
I had a friend from Celic in Bosnia. You remind me of her. She is a teacher and you both have same personality. Maybe all Bosnian have same charming personality. Anyway your lessons on C++ are great for beginners.
@carboqaddumi3944
@carboqaddumi3944 3 жыл бұрын
this channel single-handedly carried me through my freshman computer engineering year, seriously thank you keep doing this you're great! (:
@yi-chongjiang5639
@yi-chongjiang5639 2 жыл бұрын
LOVEEE this video explaining everything I need in detail!! Also love the summary part, it goes through everything again and makes the concept more solid!! thank you so much!
@kinghadu9611
@kinghadu9611 3 жыл бұрын
Saldina I don't know how you get the time to do all these videos but thank you so much for all the help you have given me I am loving programming thanks to your channel. I think a great video you can do would be building a project like one that uses a user made form and a database etc. Any sort of real world application that one would be expected to make when in the field would be awesome!!!! Again thank you so much for your incredible help in sharing your knowledge. I once read a post from a wise person he said that knowledge becomes wealth if it is shared freely but it becomes a weapon when it is kept by selfish people. Thank you for spreading your riches and bettering humanity!!!
@GlobStats
@GlobStats 2 жыл бұрын
I can't thank you enough, you have a great method of explaining.
@jasswrites3195
@jasswrites3195 3 жыл бұрын
Never stop making videos, you are doing a great work!!
@nicholasoneal1521
@nicholasoneal1521 3 жыл бұрын
Seriously, this is the best programming channel on youtube. U r awesome!
@zombiehellmonkeygaming1956
@zombiehellmonkeygaming1956 3 жыл бұрын
Thank you for the video, I've learned exception handling already, but I always watch your videos in case I missed something when I first learned it, or you give a better explanation.
@manoking9619
@manoking9619 Жыл бұрын
Your videos are so good that my professor takes your code and uses it for class lessons! Either that or you both code very similarly.
@lusandamtembu7383
@lusandamtembu7383 8 ай бұрын
yoh, you saved me when i needed you most. thank you for your easy to follow and understand videos
@santoshsolanke7300
@santoshsolanke7300 2 жыл бұрын
This channel is very perfect for learning C++ in an organic and simple way. she is teaching in very simple method spacially thanks, Mam for providing very helpful knowledge
@marcofe82
@marcofe82 2 жыл бұрын
Ciao Saldina, really good explanation about exceptions. I've also appreciated your slow speak, cause in this way every single words is recognizable and it's possible to totally absorb the meaning of the lesson.
@moularaoul643
@moularaoul643 3 жыл бұрын
Thank you for all the time you give us!!!
@phenhlucky
@phenhlucky 3 жыл бұрын
Thank you for all the time that you teach us🙏❤️
@selenahurloi5876
@selenahurloi5876 2 жыл бұрын
you are so good at explaining, i love watching your videos and hopefully i will also pass the exam!!
@denishnatiuk921
@denishnatiuk921 2 жыл бұрын
I Just couldn't grasp try catch blocks until this video thank you.
@ignaciodelvalle158
@ignaciodelvalle158 Жыл бұрын
What I like about his videos is the pace and efficiency of what he explains. A discovery this channel!! It would be nice if you shared the code, although it is true that doing it by hand helps to understand it better.
@learningprogram5288
@learningprogram5288 2 жыл бұрын
Awesome. this is what i have been looking for. implementation on the topic and clear explanation.
@rosabeigi
@rosabeigi 2 жыл бұрын
I find your content so useful
@rakshitsen5110
@rakshitsen5110 3 жыл бұрын
Big fan from india🇮🇳. Ma'am your video help c++ language a lot. Thank you so so much.
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Thanks for the support. Greetings to India! 🇮🇳🥰🥰
@tiantianliu5958
@tiantianliu5958 5 ай бұрын
Great! Keep going code beauty! every interesting training.
@waqarahmad5939
@waqarahmad5939 2 жыл бұрын
Wonderful explanation of exceptions. You made it easy.
@RobertSurma
@RobertSurma Жыл бұрын
Good diction, very clearly explained. Perfect!
@phutrung3027
@phutrung3027 2 жыл бұрын
This tutorial is very helpful for me. By many videos like this, I can learn not only coding but also English learning skill
@rohaannadeem914
@rohaannadeem914 2 жыл бұрын
Your teaching way is superb
@shubhamkalravevo1884
@shubhamkalravevo1884 2 жыл бұрын
What a fantastic explanation.!
@nastaranhendijani681
@nastaranhendijani681 5 ай бұрын
Thank you for your videos, I like them very much! very helpful!
@Hiyori___
@Hiyori___ 3 жыл бұрын
Amazing teacher, thank you
@monilcharola6873
@monilcharola6873 2 жыл бұрын
Thank You !! Kudos to your good work !
@user-nw5iw5ew9z
@user-nw5iw5ew9z Жыл бұрын
Thank you for your lessons, Saldina. You have clear English pronunciation, I like it. My English isn't so good, may be pre-intermediate level, but I understand you. Aside from programming I will study English listening with your lessons :) With love from Russia
@ksprakashkumar
@ksprakashkumar Жыл бұрын
Hi Saldina, Thanks a lot for your effort in teaching C++. In this example, we can add one more print and demonstrate that fourth print will not get executed when third print got an exception.
@preetichaudhari319
@preetichaudhari319 3 жыл бұрын
Hey Saldina! I would really appreciate if you can make a detailed video on Operator Overloading including topics such as Fundamentals of Operator Overloading, Restrictions on Operators Overloading, Operator Functions as Class Members vs. as Friend Functions, Overloading Unary Operators, Overloading Binary Operators, Overloading of operators using friend functions. Thanks!
@muhammetkaplan8869
@muhammetkaplan8869 3 жыл бұрын
You are a perfect detail in this world :D keep going, as a nonnative English speaker I found your speaking is very simple but at the same time understandable perfectly :D
@samael2187
@samael2187 2 жыл бұрын
Amazing video you just helped me add exceptions to my final project thnx a lot
@danbrown6698
@danbrown6698 2 жыл бұрын
You've explained exception quite clear.
@chulbalytwins2450
@chulbalytwins2450 2 жыл бұрын
saldina i salute your work you are so much hardworking
@wscamel226
@wscamel226 Жыл бұрын
Awesome. Thank you
@livedz9206
@livedz9206 3 жыл бұрын
Hii love from algeria❤️your teaching skills are awesome
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Thanks and welcome! Greetings for Algeria! 💜
@neeldurugkar5758
@neeldurugkar5758 3 жыл бұрын
Thank you for the video, awaiting for next videos ♥️
@hemersonallan
@hemersonallan Жыл бұрын
Awesome ! Thank You !
@aliafzal3029
@aliafzal3029 3 жыл бұрын
hey seldena.. U have busy routine but still u spend time on us like making videos for us and share your knowledge with us and i think U r amazing 🙏💜
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Thank you so much. the support that I get from this community means a lot to me! You're the best! 💜💜💜 it's Saldina*
@tamarabenjamin9089
@tamarabenjamin9089 3 жыл бұрын
My favorite youtube teacher for C++.
@senalshamika9426
@senalshamika9426 3 жыл бұрын
You are a great teacher saldina
@jomarbombita5078
@jomarbombita5078 3 жыл бұрын
Hmmp for me you are one great teacher So very clear and understable thanks😊
@nastaranheidarysharifabadi4648
@nastaranheidarysharifabadi4648 Жыл бұрын
thank you. Im begginer in cpp and its useful for me.🥰
@xaadadaa
@xaadadaa 3 жыл бұрын
best programming channel i learned so much from u
@CodeBeauty
@CodeBeauty 3 жыл бұрын
I'm happy to hear that 🙏💙
@HazemAbdElhamid-ey9sy
@HazemAbdElhamid-ey9sy 21 күн бұрын
So clear...Thanks.
@dipenpandit684
@dipenpandit684 Жыл бұрын
it's my OOP exam in 2 days this video was absolutely helpul
@4theloveoflife431
@4theloveoflife431 5 ай бұрын
Thank you sooo much. This try catch throw stuff is quite tricky if you first touch it!!,😅
@digantachaudhuri
@digantachaudhuri 3 жыл бұрын
Subscriber++; Thanks for this video, Nice explanation. ❤️ from India.
@ksanavengsar4050
@ksanavengsar4050 Жыл бұрын
thank you so much for this video 🤗
@krentwhite2668
@krentwhite2668 2 жыл бұрын
this video is very useful👍
@malatini_ytb
@malatini_ytb 2 жыл бұрын
Thank you so much !!
@VoidloniXaarii
@VoidloniXaarii 14 күн бұрын
Thank you so much yet again
@johnsknows3135
@johnsknows3135 Жыл бұрын
thank you kindly!
@aleks_mag
@aleks_mag 3 жыл бұрын
I like that your have tasks under video. So your make not just video it's very good content for learning.
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Yep, I often include small tasks so that my viewers can use them to practice on their own as well. Thanks! 😃😃
@MrNYT
@MrNYT 3 жыл бұрын
This vedio I really all the time which I want 🙏 thank mam
@mrshaders5269
@mrshaders5269 2 жыл бұрын
Great Work
@guaicaipurouzumaki7654
@guaicaipurouzumaki7654 2 жыл бұрын
cool explain about handling errors in c++
@fKO_8004IrAn
@fKO_8004IrAn 2 жыл бұрын
a very very good video :) thank you
@francescolimberti7306
@francescolimberti7306 2 жыл бұрын
Thank you!
@o_o6869
@o_o6869 3 жыл бұрын
i would love to learn coding,well appreciated Saldina.
@mose999
@mose999 Жыл бұрын
I summerize a point which may be easily overlooked: in 12:39 you must use "a pointer" as the parameter , so if you throw a "string type var" , you use the const char * ,because we need a pointer,however,"string" doesn't have pointer and "char" do.And string is actually a "char"
@ramtodkar1681
@ramtodkar1681 2 жыл бұрын
You have great skill explain concept 😉
@KarinaGarcia-tk5re
@KarinaGarcia-tk5re Жыл бұрын
TE AMO ,,, THANKS FOR TEACHING C++
@amosreginaldjr.4200
@amosreginaldjr.4200 3 жыл бұрын
C++ is beautiful when you understand it!
@charlesmaganga8430
@charlesmaganga8430 Жыл бұрын
Much appreciation
@AhmedRaza-ty7zq
@AhmedRaza-ty7zq 7 ай бұрын
Awesome video😎😎👍👍
@hbm293
@hbm293 3 жыл бұрын
One of the important topics in C++, especially when using the STL as almost all of its functions will throw exceptions as soon as they encounter errors.
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Indeed, it is very important topic! Thanks for your help with replying the comments in the chat today! 😃💜
@shendoo2020
@shendoo2020 2 жыл бұрын
Thank you 😊
@ahmadmahdi2245
@ahmadmahdi2245 2 жыл бұрын
Amazing!
@free-mind1
@free-mind1 Жыл бұрын
You are the best ever ❤ 👏👏
@worldknowledge4969
@worldknowledge4969 2 жыл бұрын
Amazing video ,I like this video
@mohammadhawa337
@mohammadhawa337 3 жыл бұрын
Thanks Saldine
@adrienc8716
@adrienc8716 15 күн бұрын
I like your videos. It's very clear :)
@CodeBeauty
@CodeBeauty 15 күн бұрын
I'm happy to hear that 🥰
@malikmuhammadarslan9993
@malikmuhammadarslan9993 2 жыл бұрын
You are Such a Legend please make C# videos
@umairawan3938
@umairawan3938 3 жыл бұрын
Most awaited!!!
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Happy to hear that! ❤️
@neepunpatil5201
@neepunpatil5201 3 жыл бұрын
Waiting!!!!!
@CodeBeauty
@CodeBeauty 3 жыл бұрын
😃💜
@siphelelenxumalo6147
@siphelelenxumalo6147 7 ай бұрын
Hey Saldina , thank you so much for your videos, helps all the time🥺. Could you please also do a video on code smells in c++ ,like inappropriate intimacy, data class etc. and code refactoring
@charlesschmidt4272
@charlesschmidt4272 2 жыл бұрын
Very good concise introduction. Small point: there's a bug. Documents shorter than 10 characters will print without reducing the amount of available paper.
@SHIVAMTIWARI-we9jq
@SHIVAMTIWARI-we9jq 2 жыл бұрын
nice lecture
@atvuduy9238
@atvuduy9238 3 жыл бұрын
Very good. I come from VietNam. I learn both English and C++
@vickvolpe5967
@vickvolpe5967 3 жыл бұрын
italian subtitle, thanks 💯❤️
@thangtd3010
@thangtd3010 2 жыл бұрын
thank you
@pranitkharat621
@pranitkharat621 3 жыл бұрын
I am from India, mam ur awesome 🙌
@beegameplay2.082
@beegameplay2.082 3 жыл бұрын
I like your imformational videos we need some more videos about Data Structure and Algorithm and Web Development languages including some projects and i think you will helps your viewers and fans 😊
@saifmos6516
@saifmos6516 2 жыл бұрын
such a good video, i wonder if you could please explain us the socket and threading in c++ , also i noticed you are good at shortcuts , in your opinion what are the shortcuts that a programmer needs i saw you commenting many lines with one button and i was like oh man this could save my time so good hehe , thanks for the video
@moisesnapoles2153
@moisesnapoles2153 3 жыл бұрын
GREAT! 🤩
@CodeBeauty
@CodeBeauty 3 жыл бұрын
Thanks! 😄
@elenibeyene2112
@elenibeyene2112 2 жыл бұрын
Amazing video i like it,,,
@ukaszkiepas57
@ukaszkiepas57 2 жыл бұрын
Thanks ;)
@subee128
@subee128 2 жыл бұрын
Thanks
SMART POINTERS in C++ (for beginners in 20 minutes)
24:32
CodeBeauty
Рет қаралды 97 М.
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 53 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
1,000 Diamonds! (Funny Minecraft Animation) #shorts #cartoon
00:31
toonz CRAFT
Рет қаралды 39 МЛН
Exception Handling in Java Tutorial
13:20
Coding with John
Рет қаралды 374 М.
What are header files in C++ ( PROGRAMMING TUTORIAL for beginners)
23:54
are "smart pointers" actually smart?
9:44
Low Level Learning
Рет қаралды 72 М.
Friend functions and classes in C++ (Programming for beginners)
18:18
Exception Handling | C++ Tutorial
14:49
Portfolio Courses
Рет қаралды 16 М.
Look, this is the 97th generation of the phone?
0:13
Edcers
Рет қаралды 8 МЛН
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 542 М.
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 13 МЛН