// // GLFWException.cs // // Copyright (C) 2018 OpenTK // // This software may be modified and distributed under the terms // of the MIT license. See the LICENSE file for details. // using System; using System.Runtime.Serialization; namespace OpenToolkit.GraphicsLibraryFramework { /// /// Represents errors that occur within GLFW. /// [Serializable] public class GLFWException : Exception { /// /// Gets the underlying GLFW-error code. /// public ErrorCode ErrorCode { get; } /// /// Initializes a new instance of the class. /// public GLFWException() { } /// /// Initializes a new instance of the class with the specified detailed description. /// /// A detailed description of the error. public GLFWException(string message) : base(message) { } /// /// Initializes a new instance of the class /// with the specified detailed description and GLFW error code. /// /// A detailed description of the error. /// The GLFW error code causing the exception. public GLFWException(string message, ErrorCode errorCode) : base(message) { ErrorCode = errorCode; } /// /// Initializes a new instance of the class with the specified detailed description /// and the specified exception. /// /// A detailed description of the error. /// A reference to the inner exception that is the cause of this exception. public GLFWException(string message, Exception innerException) : base(message, innerException) { } } }