getsentry/raven-php — pull request #142 by arthens (2014-04-10 05:08:30+00:00)
Title: Expose curl error message

## Why

In case of error `getLastError()` contains the return of `curl_exec`, which always returns `false` on failure. This make failures hard to diagnose without modifying `Raven_Client`. We added `getLastErrorMessage()`, and it proved useful while integrating our system with Sentry, so we think it might be worth adding it to the standard library.

## Could we re-use `getLastError()`?

I think it would make sense for `getLastError()` to return the actual error. The problem with that is that it changes the interface. Right now `$client->getLastError() === false` is the only way to check if an error happened, but if we change it to return the error message then it will suddenly evaluate to `false` when an error happened.

No idea if people are actually using `getLastError()`, but I opted for adding a new method to maintain backward compatibility.