there's no try - catch in php 🙁
the db functions usually return false on error, you can handle that. see db functions reference. (with oracle it's a hassle, but I assume you'll use mysql.)
besides, you can suppress error messages using the @ in front of functions you call. that's no error handling, though.