View Source ExCurl.CurlErrorCodes (ex_curl v0.3.0)
Helper functions to map libcurl error codes from their integer value to the string value and vice versa.
Summary
Functions
Returns the integer code for the corresponding string error message.
Returns the string message for a coresponding integer error code.
Functions
Returns the integer code for the corresponding string error message.
Returns -1
if the message is not a valid curl error code.
Examples
iex> ExCurl.CurlErrorCodes.get_code("URL_MALFORMAT")
3
iex> ExCurl.CurlErrorCodes.get_code("DOESN'T EXIST")
-1
Returns the string message for a coresponding integer error code.
Returns "CODE_OUT_OF_RANGE
if the value is not a valid curl error code.
Examples
iex> ExCurl.CurlErrorCodes.get_message(3)
"URL_MALFORMAT"
iex> ExCurl.CurlErrorCodes.get_message(256)
"CODE_OUT_OF_RANGE"