How to catch curl errors in PHP