hedgewars/uConsole.pas
changeset 17 a6bed8d31444
parent 4 bcbd7adb4e4b
child 32 78bff13b11c0
--- a/hedgewars/uConsole.pas	Sun Sep 11 21:02:11 2005 +0000
+++ b/hedgewars/uConsole.pas	Mon Sep 12 21:16:57 2005 +0000
@@ -67,9 +67,8 @@
 
 function RegisterVariable(Name: string; VType: TVariableType; p: pointer): PVariable;
 begin
-try
-   New(Result);
-except Result:= nil; OutError(errmsgDynamicVar, true) end;
+New(Result);
+TryDo(Result <> nil, 'RegisterVariable: Result = nil', true);
 FillChar(Result^, sizeof(TVariable), 0);
 Result.Name:= Name;
 Result.VType:= VType;
@@ -90,9 +89,7 @@
       begin
       t:= tt;
       tt:= tt.Next;
-      try
       Dispose(t)
-      except OutError(errmsgDynamicVar) end;
       end;
 end;