Better error message
authorunc0rr
Mon, 16 Oct 2006 17:26:50 +0000
changeset 199 f156e54736a4
parent 198 6f00e0f4cb88
child 200 a36102728776
Better error message
hedgewars/uConsts.pas
hedgewars/uStore.pas
--- a/hedgewars/uConsts.pas	Mon Oct 16 17:10:30 2006 +0000
+++ b/hedgewars/uConsts.pas	Mon Oct 16 17:26:50 2006 +0000
@@ -68,7 +68,6 @@
       errmsgUnknownVariable = 'Unknown variable';
       errmsgIncorrectUse    = 'Incorrect use';
       errmsgShouldntRun     = 'This program shouldn''t be run manually';
-      errmsgRenderText      = 'Cannot render text';
 
       msgLoading           = 'Loading ';
       msgOK                = 'ok';
--- a/hedgewars/uStore.pas	Mon Oct 16 17:10:30 2006 +0000
+++ b/hedgewars/uStore.pas	Mon Oct 16 17:26:50 2006 +0000
@@ -111,7 +111,7 @@
 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr);
 Result.x:= X + 3;
 Result.y:= Y + 1;
-TryDo(tmpsurf <> nil, errmsgRenderText, true);
+SDLTry(tmpsurf <> nil, true);
 SDL_UpperBlit(tmpsurf, nil, Surface, @Result);
 SDL_FreeSurface(tmpsurf);
 Result.x:= X;
@@ -375,7 +375,7 @@
 clr.g:= $FF;
 clr.b:= $FF;
 tmpsurf:= TTF_RenderUTF8_Solid(Fontz[Font].Handle, PChar(s), clr);
-TryDo(tmpsurf <> nil, errmsgRenderText, true);
+SDLTry(tmpsurf <> nil, true);
 SDL_UpperBlit(tmpsurf, nil, Surface, @r);
 SDL_FreeSurface(tmpsurf)
 end;