Added xml docs.

Added GraphicsContextMissingException for use when a GraphicsContext is expected but not found.
This commit is contained in:
the_fiddler 2008-11-20 22:24:11 +00:00
parent 03fabcfb91
commit 701b95c00f

View file

@ -15,14 +15,32 @@ namespace OpenTK.Graphics
/// <summary>Represents errors related to unavailable graphics parameters..</summary> /// <summary>Represents errors related to unavailable graphics parameters..</summary>
public class GraphicsModeException : Exception public class GraphicsModeException : Exception
{ {
/// <summary>Constructs a new GraphicsModeException.</summary>
public GraphicsModeException() : base() { } public GraphicsModeException() : base() { }
/// <summary>Constructs a new GraphicsModeException with the given error message.</summary>
public GraphicsModeException(string message) : base(message) { } public GraphicsModeException(string message) : base(message) { }
} }
/// <summary>Represents errors related to a GraphicsContext.</summary> /// <summary>Represents errors related to a GraphicsContext.</summary>
public class GraphicsContextException : Exception public class GraphicsContextException : Exception
{ {
/// <summary>Constructs a new GraphicsContextException.</summary>
public GraphicsContextException() : base() { } public GraphicsContextException() : base() { }
/// <summary>Constructs a new GraphicsContextException with the given error message..</summary>
public GraphicsContextException(string message) : base(message) { } public GraphicsContextException(string message) : base(message) { }
} }
/// <summary>
/// Thrown when an operation that required GraphicsContext is performed, when no
/// GraphicsContext is current in the calling thread.
/// </summary>
public class GraphicsContextMissingException : GraphicsContextException
{
/// <summary>Constructs a new GraphicsContextMissingException.</summary>
public GraphicsContextMissingException()
: base(String.Format(
"No context is current in the calling thread (ThreadId: {0}).",
System.Threading.Thread.CurrentThread.ManagedThreadId))
{ }
}
} }