public class DeploySharpException : Exception
All custom exceptions in the project should inherit from this class. 项目中所有自定义异常都应继承自此基类。
Automatically logs errors using MyLogger when instantiated. 实例化时会自动通过MyLogger记录错误。
DeploySharpException(String) | Basic constructor with error message. 基础构造函数(仅错误信息) |
DeploySharpException(String, Exception) | Constructor with message and inner exception. 包含内部异常的构造函数 |
DeploySharpException(String, String, String) | Full parameter constructor with error code and optional technical details. 完整参数构造函数(包含错误代码和技术细节) |
DeploySharpException(String, String, Exception, String) | Full parameter constructor with error code, inner exception and optional technical details. 完整参数构造函数(包含错误代码、内部异常和技术细节) |
Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (继承自 Exception。) |
ErrorCode | Gets the error code following project conventions (e.g. DEPLOY_001 format). 获取遵循项目规范的错误代码(如DEPLOY_001格式) |
HelpLink | Gets or sets a link to the help file associated with this exception. (继承自 Exception。) |
HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (继承自 Exception。) |
InnerException | Gets the Exception instance that caused the current exception. (继承自 Exception。) |
Message | Gets a message that describes the current exception. (继承自 Exception。) |
Source | Gets or sets the name of the application or the object that causes the error. (继承自 Exception。) |
StackTrace | Gets a string representation of the immediate frames on the call stack. (继承自 Exception。) |
TargetSite | Gets the method that throws the current exception. (继承自 Exception。) |
TechnicalDetails | Gets technical details for developer debugging purposes. 获取用于开发人员调试的技术细节 |
Equals | Determines whether the specified object is equal to the current object. (继承自 Object。) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object。) |
GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (继承自 Exception。) |
GetHashCode | Serves as the default hash function. (继承自 Object。) |
GetType | Gets the runtime type of the current instance. (继承自 Exception。) |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object。) |
ToString |
Overrides ToString() to include error code and technical details when available.
重写ToString()方法,包含错误代码和技术细节(如果存在)
(重写 ExceptionToString) |
SerializeObjectState | Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. (继承自 Exception。) |