diff --git a/Source/OpenTK/Platform/SDL2/Sdl2GraphicsContext.cs b/Source/OpenTK/Platform/SDL2/Sdl2GraphicsContext.cs index 5dee13f7..7bd759bb 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2GraphicsContext.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2GraphicsContext.cs @@ -68,7 +68,9 @@ namespace OpenTK.Platform.SDL2 } if (SdlContext == ContextHandle.Zero) { - Debug.Print("SDL2 failed to create OpenGL context: {0}", SDL.SDL_GetError()); + var error = SDL.SDL_GetError(); + Debug.Print("SDL2 failed to create OpenGL context: {0}", error); + throw new GraphicsContextException(error); } Handle = GraphicsContext.GetCurrentContext(); }