MCPcopy Create free account
hub / github.com/ammaarreshi/Generals-Mac-iOS-iPad / OnError

Method OnError

Core/Tools/PATCHGET/DownloadManager.cpp:127–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127HRESULT DownloadManager::OnError( int error )
128{
129 m_wasError = true;
130 std::string s = Fetch_String(FTP_UnknownError);
131 switch (error)
132 {
133 case DOWNLOADEVENT_NOSUCHSERVER:
134 s = Fetch_String(FTP_NoSuchServer);
135 break;
136 case DOWNLOADEVENT_COULDNOTCONNECT:
137 s = Fetch_String(FTP_CouldNotConnect);
138 break;
139 case DOWNLOADEVENT_LOGINFAILED:
140 s = Fetch_String(FTP_LoginFailed);
141 break;
142 case DOWNLOADEVENT_NOSUCHFILE:
143 s = Fetch_String(FTP_NoSuchFile);
144 break;
145 case DOWNLOADEVENT_LOCALFILEOPENFAILED:
146 s = Fetch_String(FTP_LocalFileOpenFailed);
147 break;
148 case DOWNLOADEVENT_TCPERROR:
149 s = Fetch_String(FTP_TCPError);
150 break;
151 case DOWNLOADEVENT_DISCONNECTERROR:
152 s = Fetch_String(FTP_DisconnectError);
153 break;
154 }
155 m_errorString = s;
156 DEBUG_LOG(("DownloadManager::OnError(): %s(%d)", s.c_str(), error));
157 return S_OK;
158}
159
160HRESULT DownloadManager::OnEnd()
161{

Callers

nothing calls this directly

Calls 2

Fetch_StringFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected