Github plugin: fix lack of message when trying to download a non existing footprint library (Curl does not return an error: the message "Not Fount" is stored in buffer, and the zip handler returns a not suitable error message)
Minor and very minor other fixes.
This commit is contained in:
@@ -38,7 +38,7 @@ I have lost my enthusiasm for local caching until a faster time stamp retrieval
|
||||
mechanism can be found, or github gets more servers. But note that the occasionally
|
||||
slow response is the exception rather than the norm. Normally the response is
|
||||
down around a 1/3 of a second. The information we would use is in the header
|
||||
named "Last-Modified" as seen below.
|
||||
named "Last-Modified" as seen below.
|
||||
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
@@ -545,13 +545,23 @@ void GITHUB_PLUGIN::remoteGetZip( const wxString& aRepoURL ) throw( IO_ERROR )
|
||||
{
|
||||
UTF8 fmt( _( "%s\nCannot get/download Zip archive: '%s'\nfor library path: '%s'.\nReason: '%s'" ) );
|
||||
|
||||
std::string msg = StrPrintf( fmt.c_str(),
|
||||
zip_url.c_str(),
|
||||
std::string msg = StrPrintf( fmt.c_str(),
|
||||
zip_url.c_str(),
|
||||
TO_UTF8( aRepoURL ),
|
||||
TO_UTF8( ioe.errorText ) );
|
||||
|
||||
THROW_IO_ERROR( msg );
|
||||
}
|
||||
|
||||
// If the zip archive is not existing, the received data is "Not Found",
|
||||
// and no error is returned by kcurl.Perform().
|
||||
if( m_zip_image.compare( 0, 9, "Not Found" ) == 0 )
|
||||
{
|
||||
UTF8 fmt( _( "Cannot download library '%s'.\nThe library does not exist on the server" ) );
|
||||
std::string msg = StrPrintf( fmt.c_str(), TO_UTF8( aRepoURL ) );
|
||||
|
||||
THROW_IO_ERROR( msg );
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 && defined(STANDALONE)
|
||||
|
||||
Reference in New Issue
Block a user