Began working on a graphical playground for testing.
Improved SDL exception class. Engine code changes. General progress.
This commit is contained in:
@@ -14,18 +14,21 @@ namespace SlatedGameToolkit.Framework.Exceptions
|
||||
/// Creates an SDL exception.
|
||||
/// </summary>
|
||||
/// <param name="Fetch">Whether or not to fetch the last error message that occurred in SDL.</param>
|
||||
public SDLException(bool autoFlush = true) : base() {
|
||||
public SDLException(bool autoFlush = true) : base(autoFlush ? SDL.SDL_GetError() : "SDL error has occurred.") {
|
||||
if (autoFlush) {
|
||||
SDLMessage = SDL.SDL_GetError();
|
||||
SDL.SDL_ClearError();
|
||||
}
|
||||
}
|
||||
|
||||
public SDLException(string message, Exception inner) : base(message, inner) {
|
||||
|
||||
public SDLException(string message, bool autoFlush = true) : base(message + " (" + (autoFlush ? SDL.SDL_GetError() : "SDL error has occurred.") + ")") {
|
||||
if (autoFlush) {
|
||||
SDLMessage = SDL.SDL_GetError();
|
||||
SDL.SDL_ClearError();
|
||||
}
|
||||
}
|
||||
|
||||
public SDLException(string message, bool autoFlush = true) : base(message) {
|
||||
public SDLException(string message, Exception inner, bool autoFlush = true) : base(message + " (" + (autoFlush ? SDL.SDL_GetError() : "SDL error has occurred.") + ")", inner) {
|
||||
if (autoFlush) {
|
||||
SDLMessage = SDL.SDL_GetError();
|
||||
SDL.SDL_ClearError();
|
||||
|
Reference in New Issue
Block a user