添加项目文件。
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HardwareControl.Core
|
||||
{
|
||||
public enum HardwareErrorKind
|
||||
{
|
||||
NotConnected,
|
||||
ConnectFailed,
|
||||
CommunicationFailed,
|
||||
Timeout,
|
||||
Unknown,
|
||||
InvalidArgument,
|
||||
InvalidState,
|
||||
NotSupported
|
||||
}
|
||||
|
||||
public class HardwareException : Exception
|
||||
{
|
||||
public HardwareErrorKind Kind { get; }
|
||||
|
||||
public HardwareException(HardwareErrorKind kind, string message, Exception? inner = null) : base(message, inner)
|
||||
{
|
||||
Kind = kind;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user