...

/

The Exception Class

The Exception Class

This lesson discusses how you can use the Exception class for exception handling using various coding scenarios.

We'll cover the following...

PHP has a class-based exception handling mechanism. The Exception class is a built-in class with various methods and properties. In this lesson, we will be just be concerned with learning the basics of exception handling using the PHP Exception class.

Components

  • try: It is the block of code in which exception may arise.

  • ...