--- a/hedgewars/uDebug.pas Tue Nov 10 18:16:35 2015 +0100
+++ b/hedgewars/uDebug.pas Tue Nov 10 20:43:13 2015 +0100
@@ -1,6 +1,6 @@
(*
* Hedgewars, a free turn based strategy game
- * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com>
+ * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*)
{$INCLUDE "options.inc"}
@@ -27,13 +27,18 @@
procedure SDLTry(Assert: boolean; Msg: shortstring; isFatal: boolean);
implementation
-uses SDLh, uConsole, uCommands;
+uses SDLh, uConsole, uCommands, uConsts;
procedure OutError(Msg: shortstring; isFatalError: boolean);
begin
WriteLnToConsole(Msg);
if isFatalError then
+ begin
ParseCommand('fatal ' + lastConsoleline, true);
+ // hint for the 'coverity' source analyzer
+ // this halt is never actually reached because ParseCommands will halt first
+ halt(HaltFatalError);
+ end;
end;
procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean);