Added 'connection refused' stream error.
This commit is contained in:
@@ -66,13 +66,14 @@ enum class FileOpenMode
|
||||
|
||||
enum class [[nodiscard]] StreamError
|
||||
{
|
||||
SUCCESS = 0,
|
||||
IO_ERROR = 1,
|
||||
NOT_SUPPORTED = 2,
|
||||
CONNECTION_CLOSED = 3,
|
||||
PROTOCOL_ERROR = 4,
|
||||
WOULD_BLOCK = 5,
|
||||
UNKNOWN_ERROR = -1
|
||||
SUCCESS = 0,
|
||||
IO_ERROR = 1,
|
||||
NOT_SUPPORTED = 2,
|
||||
CONNECTION_CLOSED = 3,
|
||||
PROTOCOL_ERROR = 4,
|
||||
WOULD_BLOCK = 5,
|
||||
CONNECTION_REFUSED = 6,
|
||||
UNKNOWN_ERROR = -1
|
||||
};
|
||||
|
||||
class Stream
|
||||
@@ -450,6 +451,8 @@ inline const char* errorName(StreamError error) MIJIN_NOEXCEPT
|
||||
return "would block";
|
||||
case StreamError::UNKNOWN_ERROR:
|
||||
return "unknown error";
|
||||
case StreamError::CONNECTION_REFUSED:
|
||||
return "connection refused";
|
||||
}
|
||||
return "<invalid error>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user