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

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
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 up-
mariana virga
6,393 Points0 Answers
-
Kristian Woods
23,414 Points1 Answer
-
annapoff
13,552 Points1 Answer
-
Vatsal Shah
91 Pointshttps://teamtreehouse.com/library/integrating-php-with-databases/databases-and-php/more-exceptions
Posted by Vatsal ShahVatsal Shah
91 Points1 Answer
-
Joe Scotto
8,282 Points4 Answers
-
PLUS
Robbie The King
Courses Plus Student 111 Points2 Answers
-
Unsubscribed User
48,988 Points1 Answer
View all discussions for this video
Related 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