More Exceptions4:57 with Alena Holligan
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.
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.
You need to sign up for Treehouse in order to download course files.Sign up