Files
mono/mcs/class/corlib/System.Security.Cryptography/CryptographicException.cs
T
Sebastien Pouliot bb95b6dced 2003-01-25 Sebastien Pouliot <[email protected]>
* CryptographicException.cs: Default HResult to CORSEC_E_CRYPTO
	(0x80131430) as documented.
	* CryptographicUnexpectedOperationException.cs: Default HResult
	to CORSEC_E_CRYPTO_UNEX_OPER (0x80131431) as documented.

svn path=/trunk/mcs/; revision=10887
2003-01-25 21:19:35 +00:00

55 lines
1.1 KiB
C#
Executable File

//
// System.Security.Cryptography.CryptographicException.cs
//
// Author:
// Thomas Neidhart ([email protected])
//
using System;
using System.Runtime.Serialization;
namespace System.Security.Cryptography {
[Serializable]
public class CryptographicException : SystemException {
// Constructors
public CryptographicException ()
: base ("Error occured during a cryptographic operation.")
{
// default to CORSEC_E_CRYPTO
// defined as EMAKEHR(0x1430) in CorError.h
HResult = unchecked ((int)0x80131430);
}
public CryptographicException (int hr)
{
HResult = hr;
}
public CryptographicException (string message)
: base (message)
{
HResult = unchecked ((int)0x80131430);
}
public CryptographicException (string message, Exception inner)
: base (message, inner)
{
HResult = unchecked ((int)0x80131430);
}
public CryptographicException (string format, string insert)
: base (String.Format(format, insert))
{
HResult = unchecked ((int)0x80131430);
}
protected CryptographicException (SerializationInfo info, StreamingContext context)
: base (info, context)
{
}
}
}