diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-24 22:21:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-24 22:21:02 +0300 |
commit | 490a93a1d7a347ab586637bf9d8163e114285a02 (patch) | |
tree | cae315ef7502f6e9b4b55bd68bac66d5fb8e33ff /src/client.cpp | |
parent | a5926417dad1f91966ccacfc5572369d309c59be (diff) | |
download | manaverse-490a93a1d7a347ab586637bf9d8163e114285a02.tar.gz manaverse-490a93a1d7a347ab586637bf9d8163e114285a02.tar.bz2 manaverse-490a93a1d7a347ab586637bf9d8163e114285a02.tar.xz manaverse-490a93a1d7a347ab586637bf9d8163e114285a02.zip |
Add safe error string reporting function.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp index 242bb2f21..978c58eef 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -363,7 +363,7 @@ void Client::gameInit() logger->log1("Initializing SDL..."); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0) { - logger->error(strprintf("Could not initialize SDL: %s", + logger->safeError(strprintf("Could not initialize SDL: %s", SDL_GetError())); } atexit(SDL_Quit); @@ -555,7 +555,7 @@ void Client::gameInit() if (!mainGraphics->setVideoMode(oldWidth, oldHeight, bpp, oldFullscreen, hwaccel, enableResize, noFrame)) { - logger->error(strprintf("Couldn't restore %dx%dx%d " + logger->safeError(strprintf("Couldn't restore %dx%dx%d " "video mode: %s", oldWidth, oldHeight, bpp, SDL_GetError())); } |