mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Tweak example
This commit is contained in:
parent
4815bd386b
commit
c3ac6407fa
@ -72,11 +72,11 @@ try {
|
||||
SDL_Delay(2000);
|
||||
|
||||
// All SDL objects are released at this point or if an error occurs
|
||||
} catch (SDL2pp::Exception& e) {
|
||||
} catch (const SDL2pp::Exception& e) {
|
||||
// Exception stores SDL_GetError() result and name of function which failed
|
||||
std::cerr << "Error in: " << e.GetSDLFunction() << std::endl;
|
||||
std::cerr << " Reason: " << e.GetSDLError() << std::endl;
|
||||
} catch (std::exception& e) {
|
||||
} catch (const std::exception& e) {
|
||||
// This also works (e.g. "SDL_Init failed: No available video device")
|
||||
std::cerr << e.what() << std::endl;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user