appexception.cs

来自「很不错的公文流转系统」· CS 代码 · 共 26 行

CS
26
字号
using System; 

namespace OI
{
	/// <summary>
	/// appException 的摘要说明。
	/// </summary>
	public class AppException:System.Exception 
	{
		public AppException()
		{
			OI.Modules.ErrorLog.WriteLog("发生一个异常",System.Diagnostics.EventLogEntryType.Error);
		}
		public AppException(string Message)
		{
			OI.Modules.ErrorLog.WriteLog(Message);
		}
		public AppException(string Message, Exception innerException)
		{
			OI.Modules.ErrorLog.WriteLog(Message);
			if(innerException!=null)
				OI.Modules.ErrorLog.WriteLog(innerException.Message+"\n\r"+innerException.StackTrace);
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?