46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
namespace XP.Camera;
|
|
|
|
/// <summary>所有相机相关错误的基类异常。</summary>
|
|
public class CameraException : Exception
|
|
{
|
|
public CameraException()
|
|
{ }
|
|
|
|
public CameraException(string message) : base(message)
|
|
{
|
|
}
|
|
|
|
public CameraException(string message, Exception innerException) : base(message, innerException)
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>当相机连接意外断开时抛出的异常。</summary>
|
|
public class ConnectionLostException : CameraException
|
|
{
|
|
public ConnectionLostException()
|
|
{ }
|
|
|
|
public ConnectionLostException(string message) : base(message)
|
|
{
|
|
}
|
|
|
|
public ConnectionLostException(string message, Exception innerException) : base(message, innerException)
|
|
{
|
|
}
|
|
}
|
|
|
|
/// <summary>当系统中无可用相机设备时抛出的异常。</summary>
|
|
public class DeviceNotFoundException : CameraException
|
|
{
|
|
public DeviceNotFoundException()
|
|
{ }
|
|
|
|
public DeviceNotFoundException(string message) : base(message)
|
|
{
|
|
}
|
|
|
|
public DeviceNotFoundException(string message, Exception innerException) : base(message, innerException)
|
|
{
|
|
}
|
|
} |