15

CHAPTER

Exception Handling

CHAPTEROUTLINE
—•  15.1 Introduction
—•  15.2 Principles of Exception Handling
—•  15.3 The Keywords try, throw and catch
—•  15.4 Exception Handling Mechanism
—•  15.5 Multiple Catch Statements
—•  15.6 Catching Multiple Exceptions
—•  15.7 Rethrowing Exception
—•  15.8 Specifying Exception
—•  15.9 Exceptions in Constructors and Destructors
—•15.10 Controlling Uncaught Exceptions
—•15.11 Exception and Operator Overloading
—•15.12 Exception and Inheritance
—•15.13 Class Template with Exception Handling
—•15.14 Guidelines for Exception Handling

15.1 INTRODUCTION

While writing large programs, a programmer makes many mistakes. Due to this, bugs occur even in the released softwares. ...

Get Object-Oriented Programming with ANSI and Turbo C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.