From c3ac6407fadffd777ba6ce6b9d3e6068f699cdd3 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 17 Mar 2025 23:29:31 +0300 Subject: [PATCH] Tweak example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index deed67c..18a1d59 100644 --- a/README.md +++ b/README.md @@ -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; }