📄 exceptioneventargs.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
namespace GPCore
{
/// <summary>
/// An EventArgs that contains an Exception for error handling.
/// </summary>
public class ExceptionEventArgs : EventArgs
{
private Exception e;
/// <summary>
/// The Exception.
/// </summary>
public Exception Exception
{
get { return e; }
}
/// <summary>
/// Create a new <see cref="ExceptionEventArgs"/>.
/// </summary>
/// <param name="e">The Exception to be passed.</param>
public ExceptionEventArgs(Exception e)
{
this.e = e;
}
}
/// <summary>
/// An Exception to be thrown for an invalid password.
/// </summary>
[global::System.Serializable]
public class InvalidPasswordException : ArgumentException
{
/// <summary>
/// Creates a new <see cref="InvalidPasswordException"/>.
/// </summary>
/// <param name="username">The username that tried to log in.</param>
/// <param name="password">The password that was invalid.</param>
public InvalidPasswordException(string username, string password) : base(username, password) { }
/// <summary>
/// Creates a new <see cref="InvalidPasswordException"/>.
/// </summary>
/// <param name="username">The username that tried to log in</param>
/// <param name="password">The password that was invalid</param>
/// <param name="inner">Any inner exceptions that were the cause of this failure.</param>
public InvalidPasswordException(string username, string password, Exception inner) : base(username, password, inner) { }
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -