Skip to content

Exception or return value in case of error #5

Closed
@Osso

Description

@Osso

Currently curl success is not checked.

I would to able to know in my code if the request to capture an exception has been handled successfully.
I am suggesting something like this in the send_http:

Either by throwing an exception that user has to catch.
(cleaner to me but not very php like)
if(curl_exec($curl) === false)
{
throw new RavenException(curl_error($curl));
}

or returning false (more php like)
$ret = (curl_exec($curl) !== false);
curl_close($curl);
return $ret;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions