--- parser3/src/classes/curl.C 2020/10/10 09:05:42 1.62 +++ parser3/src/classes/curl.C 2020/10/14 21:22:58 1.64 @@ -17,7 +17,7 @@ #include "pa_http.h" #include "ltdl.h" -volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.62 2020/10/10 09:05:42 moko Exp $"; +volatile const char * IDENT_CURL_C="$Id: curl.C,v 1.64 2020/10/14 21:22:58 moko Exp $"; class MCurl: public Methoded { public: @@ -725,7 +725,8 @@ static void _curl_load_action(Request& r CURL_SETOPT(CURLOPT_POSTFIELDSIZE, 0, "post content-length"); } - if((res=f_curl_easy_perform(curl())) != CURLE_OK){ + ALTER_EXCEPTION_SOURCE(res=f_curl_easy_perform(curl()), new String(options().url)); + if(res != CURLE_OK){ const char *ex_type = 0; switch(res){ case CURLE_OPERATION_TIMEDOUT: @@ -743,10 +744,10 @@ static void _curl_load_action(Request& r case CURLE_SSL_ENGINE_INITFAILED: ex_type = "curl.ssl"; break; case CURLE_WRITE_ERROR: - check_file_size(response.content_length, *new String(options().url)); break; + check_file_size(response.content_length, new String(options().url)); break; default: break; } - throw Exception( PA_DEFAULT(ex_type, "curl.fail"), 0, "%s", f_curl_easy_strerror(res)); + throw Exception( PA_DEFAULT(ex_type, "curl.fail"), new String(options().url), "%s", f_curl_easy_strerror(res)); } // assure trailing zero