21 lines
897 B
C#
21 lines
897 B
C#
using System;
|
|
using SlatedGameToolkit.Framework.Graphics;
|
|
using SlatedGameToolkit.Framework.Graphics.Window;
|
|
|
|
namespace SlatedGameToolkit.Framework.Exceptions
|
|
{
|
|
public class OpenGLErrorException : Exception {
|
|
public Graphics.OpenGL.ErrorCode ErrorCode {get; private set;}
|
|
public OpenGLErrorException(Graphics.OpenGL.ErrorCode error) : base(string.Format("OpenGL error: {0}", error)) {
|
|
this.ErrorCode = error;
|
|
}
|
|
|
|
public OpenGLErrorException(Graphics.OpenGL.ErrorCode error, string message) : base(string.Format("OpenGL error: {0}. \"{1}\"", error, message)) {
|
|
this.ErrorCode = error;
|
|
}
|
|
|
|
public OpenGLErrorException(Graphics.OpenGL.ErrorCode error, string message, Exception inner) : base(string.Format("OpenGL error: {0}. \"{1}\"", error, message), inner) {
|
|
this.ErrorCode = error;
|
|
}
|
|
}
|
|
} |