7 Error and Exception Handling

IN THIS CHAPTER, WE EXPLAIN THE CONCEPT OF exception handling and the way it is implemented in PHP. Exceptions provide a unified mechanism for handling errors in an extensible, maintainable, and object-oriented way.

Key topics covered in this chapter include

Image  Exception handling concepts

Image  Exception control structures: try…throw…catch

Image  The Exception class

  User-defined exceptions

  Exceptions in Bob’s Auto Parts

Get PHP and MySQL® Web Development, Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.