Different Exception Classes

Video loading...

Transcript language code: 

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:07
    Catching an exception is really powerful,
  • 0:10
    but you can get even fancier.
  • 0:13
    For right now, var_dump the exception object.
  • 0:16
    OK, this object is actually a PDOException.
  • 0:21
    2 important things, all exceptions are objects,
  • 0:25
    and all exception classes ultimately extend PHP's base exception class.
  • 0:32
    So if you could look at the source code for PDOException,
  • 0:35
    you'd see that it extends exception.
  • 0:38
    And this ends up giving us a lot more flexibility when working with exceptions.
  • 0:43
Loading ...

Different Exception Classes


In this PHP tutorial, you'll learn about the different exception classes that are available to you use in your PHP applications.

Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.