forked from andrewkirillov/AForge.NET
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathExceptions.cs
111 lines (105 loc) · 3.34 KB
/
Exceptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// AForge Core Library
// AForge.NET framework
// http://www.aforgenet.com/framework/
//
// Copyright © Andrew Kirillov, 2007-2009
// andrew.kirillov@aforgenet.com
//
namespace AForge
{
using System;
/// <summary>
/// Connection failed exception.
/// </summary>
///
/// <remarks><para>The exception is thrown in the case if connection to device
/// has failed.</para>
/// </remarks>
///
public class ConnectionFailedException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="ConnectionFailedException"/> class.
/// </summary>
///
/// <param name="message">Exception's message.</param>
///
public ConnectionFailedException( string message ) :
base( message ) { }
}
/// <summary>
/// Connection lost exception.
/// </summary>
///
/// <remarks><para>The exception is thrown in the case if connection to device
/// is lost. When the exception is caught, user may need to reconnect to the device.</para>
/// </remarks>
///
public class ConnectionLostException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="ConnectionLostException"/> class.
/// </summary>
///
/// <param name="message">Exception's message.</param>
///
public ConnectionLostException( string message ) :
base( message ) { }
}
/// <summary>
/// Not connected exception.
/// </summary>
///
/// <remarks><para>The exception is thrown in the case if connection to device
/// is not established, but user requests for its services.</para>
/// </remarks>
///
public class NotConnectedException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="NotConnectedException"/> class.
/// </summary>
///
/// <param name="message">Exception's message.</param>
///
public NotConnectedException( string message ) :
base( message ) { }
}
/// <summary>
/// Device busy exception.
/// </summary>
///
/// <remarks><para>The exception is thrown in the case if access to certain device
/// is not available due to the fact that it is currently busy handling other request/connection.</para>
/// </remarks>
///
public class DeviceBusyException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="DeviceBusyException"/> class.
/// </summary>
///
/// <param name="message">Exception's message.</param>
///
public DeviceBusyException( string message ) :
base( message ) { }
}
/// <summary>
/// Device error exception.
/// </summary>
///
/// <remarks><para>The exception is thrown in the case if some error happens with a device, which
/// may need to be reported to user.</para></remarks>
///
public class DeviceErrorException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="DeviceErrorException"/> class.
/// </summary>
///
/// <param name="message">Exception's message.</param>
///
public DeviceErrorException( string message ) :
base( message ) { }
}
}