|
dashel
1.3.3
|
The one size fits all exception for streams. More...
#include <dashel.h>
Public Types | |
| enum | Source { Unknown, SyncError, InvalidTarget, InvalidOperation, ConnectionLost, IOError, ConnectionFailed, EnumerationError, PreviousIncomingDataNotRead } |
| The different exception causes. More... | |
Public Member Functions | |
| DashelException (Source s, int se, const char *reason, Stream *stream=NULL) | |
| Construct an stream exception with everything. More... | |
Public Attributes | |
| Source | source |
| The exception cause. | |
| int | sysError |
| The reason as an OS error code. | |
| Stream * | stream |
| The stream that caused the exception to be thrown. | |
Static Protected Member Functions | |
| static std::string | sourceToString (Source s) |
| Return a string description of the source error. | |
The one size fits all exception for streams.
The reason of the failure is stored in the runtime error, and is returned by what()
The different exception causes.
| Enumerator | |
|---|---|
| Unknown |
Well, hopefully never used. |
| SyncError |
Some synchronisation error. |
| InvalidTarget |
The target string was bad. |
| InvalidOperation |
The operation is not valid on this stream. |
| ConnectionLost |
The connection was lost. |
| IOError |
Some I/O error. |
| ConnectionFailed |
The connection could not be established. |
| EnumerationError |
Some serial enumeration error. |
| PreviousIncomingDataNotRead |
The incoming data was not read by the Hub subclass. |
| Dashel::DashelException::DashelException | ( | Source | s, |
| int | se, | ||
| const char * | reason, | ||
| Stream * | stream = NULL |
||
| ) |
Construct an stream exception with everything.
| s | Source of failure |
| se | System error code. |
| reason | The logical reason as a human readable string. |
| stream | Stream to which exception applies. |
1.8.11