Is there a php counterpart to Java's try{}catch synatax?
What I am trying to do is if my script encounters an error instead of getting the php error on the screen I want to be able to deal with the error myself.
php equivilent to Java's try{}catch
Moderator: General Moderators
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
from the manual:
you can use these, the array functions, and some if statements to make your own version of it.All PHP expressions can also be called with the "@" prefix, which turns off error reporting for that particular expression. If an error occurred during such an expression and the track_errors feature is enabled, you can find the error message in the global variable $php_errormsg.