nullormdictionaryexception.cs
来自「该项目中对 SQLHelper 类进行了简单封装」· CS 代码 · 共 51 行
CS
51 行
/*
* NullOrmDictionaryException.cs @Microsoft Visual Studio 2005 <.NET Framework 2.0>
* AfritXia
* 2007-10-13
*
* Copyright(c) http://www.AfritXia.NET/
*
*/
using System;
namespace NET.AfritXia.DBUtility
{
/// <summary>
/// 空 ORM 字典异常
/// </summary>
public class NullOrmDictionaryException : Exception
{
// 类型信息
private Type m_classType = null;
/// <summary>
/// 类参数构造器
/// </summary>
/// <param name="type">对象类型</param>
internal NullOrmDictionaryException(Type classType)
{
this.m_classType = classType;
}
/// <summary>
/// 获取异常信息
/// </summary>
public override string Message
{
get
{
if (this.m_classType == null)
return "";
// 设置类型名称
string typeName = this.m_classType.Namespace + "." + this.m_classType.Name;
// 异常信息
string message = "未提供 {0} 类型的映射字典或字典内容为空 ( Not offer ORM dictionary for {0} or it is empty )";
// 返回异常信息
return String.Format(message, typeName);
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?