From: Ketmar Dark Date: Fri, 18 Oct 2019 00:04:39 +0000 (+0300) Subject: net: some cosmetic logging in resource downloader X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=4d7452d2a7340e4c245f5de3eec3c4d4a7e98fe2;p=d2df-sdl.git net: some cosmetic logging in resource downloader --- diff --git a/src/game/g_res_downloader.pas b/src/game/g_res_downloader.pas index 85438c4..d67dc4c 100644 --- a/src/game/g_res_downloader.pas +++ b/src/game/g_res_downloader.pas @@ -391,17 +391,18 @@ begin end; fname := GameDir+'/maps/downloads/'+generateFileName(FileName, mapHash); tf.diskName := fname; + e_LogWritefln('map disk file for `%s` is `%s`', [FileName, fname], TMsgType.Fatal); try strm := openDiskFileRW(fname); except - e_WriteLog('cannot create map file `'+FileName+'`', TMsgType.Fatal); + e_WriteLog('cannot create map file `'+fname+'`', TMsgType.Fatal); result := ''; exit; end; try res := g_Net_ReceiveResourceFile(-1{map}, tf, strm); except - e_WriteLog('error downloading map file `'+FileName+'`', TMsgType.Fatal); + e_WriteLog('error downloading map file (exception) `'+FileName+'`', TMsgType.Fatal); strm.Free; result := ''; exit; @@ -409,7 +410,7 @@ begin strm.Free; if (res <> 0) then begin - e_WriteLog('error downloading map file `'+FileName+'`', TMsgType.Fatal); + e_LogWritefln('error downloading map `%s` (res=%d)', [FileName, res], TMsgType.Fatal); result := ''; exit; end; @@ -425,7 +426,7 @@ begin DeleteFile(fname); strm := createDiskFile(fname); except - e_WriteLog('cannot create map file `'+fname+'`', TMsgType.Fatal); + e_WriteLog('cannot create map file `'+fname+'` (exception)', TMsgType.Fatal); result := ''; exit; end; @@ -440,7 +441,7 @@ begin strm.Free; if (res <> 0) then begin - e_WriteLog('error downloading map file `'+FileName+'`', TMsgType.Fatal); + e_LogWritefln('error downloading map `%s` (res=%d)', [FileName, res], TMsgType.Fatal); result := ''; exit; end;