Files
mirror-processhacker/trunk/ProcessHacker/Win32/WindowsException.cs
T
wj32 06e5f1a575 * new WindowsException class
* ProcessSystemProvider should now have an average of 0 exceptions/sec

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@551 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2009-01-20 10:44:22 +00:00

37 lines
893 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace ProcessHacker
{
/// <summary>
/// Represents a Win32 or Native exception.
/// </summary>
/// <remarks>
/// Unlike the System.ComponentModel.Win32Exception class,
/// this class does not get the error's associated
/// message unless it is requested.
/// </remarks>
public class WindowsException : Exception
{
private int _errorCode;
private string _message = null;
public WindowsException(int errorCode)
{
_errorCode = errorCode;
}
public override string Message
{
get
{
if (_message == null)
_message = Win32.GetErrorMessage(_errorCode);
return _message;
}
}
}
}