Simple PHP exception and error handling