JD2022-TU1/main/tools/framework/JD.Application.TeaBox/View/Actions/CrashActionHandler.cs

39 lines
No EOL
754 B
C#

using System;
using System.Runtime.Serialization;
using TeaBox;
namespace JD.Application.View.Actions
{
[Serializable]
public class CrashTestException : Exception
{
public CrashTestException()
{
}
public CrashTestException(string message) : base(message)
{
}
public CrashTestException(string message, Exception inner) : base(message, inner)
{
}
protected CrashTestException(
SerializationInfo info,
StreamingContext context) : base(info, context)
{
}
}
public class CrashActionHandler : ActionHandler
{
/// <summary>
/// Execute the action.
/// </summary>
public override void Execute(ActionExecutionContext context)
{
throw new CrashTestException("This exception was thrown as a test.");
}
}
}