From: Ketmar Dark Date: Sat, 16 Apr 2016 15:53:38 +0000 (+0300) Subject: added "--gdb" cli arg to stop df from eating exceptions X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=45af139bfc7713ed4eb237ac1f5288e82706564c;p=d2df-sdl.git added "--gdb" cli arg to stop df from eating exceptions --- diff --git a/src/game/Doom2DF.dpr b/src/game/Doom2DF.dpr index df5de45..6796156 100644 --- a/src/game/Doom2DF.dpr +++ b/src/game/Doom2DF.dpr @@ -95,14 +95,21 @@ uses {$R CustomRes.res} {$ENDIF} +var + f: Integer; + noct: Boolean = false; begin - try - Main(); - e_WriteLog('Shutdown with no errors.', MSG_NOTIFY); - except - on E: Exception do - e_WriteLog(Format(_lc[I_SYSTEM_ERROR_MSG], [E.Message]), MSG_FATALERROR); - else - e_WriteLog(Format(_lc[I_SYSTEM_ERROR_UNKNOWN], [LongWord(ExceptAddr())]), MSG_FATALERROR); - end; + for f := 1 to ParamCount do if ParamStr(f) = '--gdb' then noct := true; + if noct then + Main() + else + try + Main(); + e_WriteLog('Shutdown with no errors.', MSG_NOTIFY); + except + on E: Exception do + e_WriteLog(Format(_lc[I_SYSTEM_ERROR_MSG], [E.Message]), MSG_FATALERROR); + else + e_WriteLog(Format(_lc[I_SYSTEM_ERROR_UNKNOWN], [LongWord(ExceptAddr())]), MSG_FATALERROR); + end; end.