# HG changeset patch # User Wuzzy # Date 1557885360 -7200 # Node ID 8e4e508d153c276ff3c837c03cdead6ea0ec0af4 # Parent c173fae0a223dcff5a6db9ec5be5307c506641da Use HaltFatalError for all VideoRec failures diff -r c173fae0a223 -r 8e4e508d153c hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Wed May 15 03:25:20 2019 +0200 +++ b/hedgewars/uConsts.pas Wed May 15 03:56:00 2019 +0200 @@ -37,7 +37,6 @@ HaltFatalError = 52; // Fatal internal error. See logs for more. Also reports error to frontend HaltStartupError = 53; // Failure loading critical resources HaltFatalErrorNoIPC = 54; // Fatal internal error, IPC socket is not available - HaltVideoRec = 55; // Failure while video recording // for automatic tests HaltTestSuccess = 0; // Test result: success diff -r c173fae0a223 -r 8e4e508d153c hedgewars/uVideoRec.pas --- a/hedgewars/uVideoRec.pas Wed May 15 03:25:20 2019 +0200 +++ b/hedgewars/uVideoRec.pas Wed May 15 03:56:00 2019 +0200 @@ -48,7 +48,7 @@ procedure freeModule; implementation -uses uVariables, GLunit, SDLh, SysUtils, uUtils, uIO, uMisc, uConsts, uTypes, uDebug; +uses uVariables, GLunit, SDLh, SysUtils, uUtils, uIO, uMisc, uTypes, uDebug; type TAddFileLogRaw = procedure (s: pchar); cdecl; const AvwrapperLibName = 'libavwrapper'; @@ -162,8 +162,7 @@ Close(cameraFile); if AVWrapper_Close() < 0 then begin - AddFileLog('AVWrapper_Close() has failed.'); - halt(HaltVideoRec); + OutError('AVWrapper_Close() has failed.', true); end; {$IOCHECKS OFF} if FileExists(cameraFileName) then @@ -184,8 +183,7 @@ if AVWrapper_WriteFrame(RGB_Buffer) < 0 then begin - AddFileLog('AVWrapper_WriteFrame(RGB_Buffer) has failed.'); - halt(HaltVideoRec); + OutError('AVWrapper_WriteFrame(RGB_Buffer) has failed.', true); end; // inform frontend that we have encoded new frame