This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
In this video we’ll show how to get the details of the exception so we can quickly diagnose and fix the problem. We also want to tell the PDO object to make any issue an exception so we can handle them the same way.
Calling Properties and Methods
We use the single arrow (->) to call both an objects properties as well as an objects methods. Methods should end with parenthesis, just like functions, with or without passing an argument.
Exceptions
Extending Exceptions will allow you to customize what happens when an exception is encountered. You can modify the message displayed, alert support or anything else you would do in your PHP code. Check out the Documentation for Extending Exceptions.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up