Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Similar Topics
C++
4.1k+ articles
Difference Between
3.8k+ articles
C++ Programs
2.4k+ articles
C Language
1.9k+ articles
School Programming
1.4k+ articles
CPP Examples
700+ articles
Java-Exceptions
84 articles
Exception Handling
32 articles
C++-Exception Handling
26 articles
C++ Errors
21 articles

cpp-exception

15 posts
How to Use the Try and Catch Blocks in C++?
Last Updated: 21 April 2024
In C++, thetryandcatchblocks are used as a part of the exception handling mechanism which allows us to handle runtime errors. If the excepti ...read more
cpp-exception
Exception Handling
C++
C++-Exception Handling
C++ Programs
Picked
CPP Examples
How to Throw an Exception in C++?
Last Updated: 03 April 2024
In C++, exception handling is a mechanism that allows us to handle runtime errors and exceptions are objects that represent an error that oc ...read more
cpp-exception
C++
C++-Exception Handling
C++ Programs
Picked
CPP Examples
How to Throw and Catch Exceptions in C++?
Last Updated: 03 April 2024
In C++, exception handling is a mechanism that allows us to handle runtime errors and exceptions are unusual conditions that occur at runtim ...read more
cpp-exception
C++
C++-Exception Handling
C++ Programs
Picked
CPP Examples
Similar Topics
C++
4.1k+ articles
Difference Between
3.8k+ articles
C++ Programs
2.4k+ articles
C Language
1.9k+ articles
School Programming
1.4k+ articles
CPP Examples
700+ articles
Java-Exceptions
84+ articles
Exception Handling
32+ articles
C++-Exception Handling
26+ articles
C++ Errors
21+ articles
How to Catch All Exceptions in C++?
Last Updated: 18 March 2024
In C++, exceptions are objects that indicate you have an error in your program. They are handled by the try-catch block in C++. In this arti ...read more
cpp-exception
C++
C++ Programs
Picked
CPP Examples
How Do I Continue to the Next Iteration of a for Loop After an Exception is Thrown in C++?
Last Updated: 22 February 2024
In C++, when an exception is thrown, the normal flow of the program is disrupted and we need to take care of it. In this article, we will le ...read more
cpp-exception
C++
C++-Exception Handling
C++ Programs
Picked
CPP Examples
How to Throw a Custom Exception in C++?
Last Updated: 08 February 2024
In C++, exception handling is done by throwing an exception in a try block and catching it in the catch block. We generally throw the built- ...read more
cpp-exception
Exception Handling
C++
C++-Exception Handling
C++ Programs
Picked
CPP Examples
How to Catch a Specific Exception in C++?
Last Updated: 08 February 2024
In C++, exceptions are runtime anomalies or abnormal conditions that a program encounters during its execution. The process of handling thes ...read more
cpp-exception
C++
C++-Exception Handling
C++ Programs
Picked
C++ Errors
CPP Examples
How to Catch Floating Point Errors in C++?
Last Updated: 29 January 2024
In C++, a part of the code that may throw exceptions is enclosed in try-and-catch blocks to handle them when they arise. We can also use try ...read more
cpp-exception
Exception Handling
C++
C++-Exception Handling
C++ Programs
Picked
CPP Examples
Exception Handling using Classes in C++
Last Updated: 11 April 2025
In C++, unexpected issues may occur during program execution such as attempting to divide by zero, accessing a non-existent file or using in ...read more
CPP-Basics
cpp-exception
C++
C++-Exception Handling
C++ Programs
C/C++ Puzzles
Exception Header in C++ With Examples
Last Updated: 09 October 2022
C++ provides a list of standard exceptions defined in header exception in namespace std where "exception" is the base class for all standard ...read more
cpp-exception
Programming Language
C++
C++-Exception Handling
C++ Programs
Handling the Divide by Zero Exception in C++
Last Updated: 23 July 2024
We use Exception Handling to overcome exceptions occurred in execution of a program in a systematic manner.Dividing a number by Zero is a ma ...read more
cpp-exception
C++
Customizing termination behavior for uncaught exception In C++
Last Updated: 15 April 2018
Whenever an exception arises in C++, it is handled as per the behavior defined using the try-catch block. However, there is often the case w ...read more
cpp-exception
C++
bad_alloc in C++
Last Updated: 27 February 2018
Prerequisite : Exceptions in C++Standard C++ contains several built-in exception classes. The most commonly used is bad_alloc, which is thro ...read more
cpp-exception
C++
Exception Handling in C++
Last Updated: 14 April 2025
In C++, exceptions are unexpected problems or errors that occur while a program is running. For example, in a program that divides two numbe...read more
image
cpp-exception
C Language
C++
School Programming
Comparison of Exception Handling in C++ and Java
Last Updated: 10 November 2022
Both languages use to try, catch and throw keywords for exception handling, and their meaning is also the same in both languages.Following a ...read more
Java
cpp-exception
Java-Exceptions
C++
Difference Between
1
1
1
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox