more result codes
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
using namespace std;
|
||||
|
||||
const char* getResultCode(result_t resultCode) {
|
||||
cout << "DEBUG error code: " << static_cast<signed>(resultCode) << endl;
|
||||
switch (resultCode) {
|
||||
case RESULT_ERR_SEND: return "ERR_SEND: send error";
|
||||
case RESULT_ERR_EXTRA_DATA: return "ERR_EXTRA_DATA: received bytes > sent bytes";
|
||||
@@ -37,6 +36,8 @@ cout << "DEBUG error code: " << static_cast<signed>(resultCode) << endl;
|
||||
case RESULT_ERR_INVALID_ARG: return "ERR_INVALID_ARG: invalid argument specified";
|
||||
case RESULT_ERR_DEVICE: return "ERR_DEVICE: generic device error";
|
||||
case RESULT_ERR_EOF: return "ERR_EOF: end of input reached";
|
||||
case RESULT_ERR_FILENOTFOUND: return "ERR_FILENOTFOUND: file not found or not readable";
|
||||
case RESULT_ERR_DUPLICATE: return "ERR_DUPLICATE: duplicate entry";
|
||||
default:
|
||||
if (resultCode >= 0)
|
||||
return "success";
|
||||
|
||||
@@ -41,6 +41,8 @@ static const int RESULT_ERR_ESC = -9; // invalid escape sequence receiv
|
||||
static const int RESULT_ERR_INVALID_ARG = -10; // invalid argument
|
||||
static const int RESULT_ERR_DEVICE = -11; // generic device error (usually fatal)
|
||||
static const int RESULT_ERR_EOF = -12; // end of input reached
|
||||
static const int RESULT_ERR_FILENOTFOUND = -13;// file not found or not readable
|
||||
static const int RESULT_ERR_DUPLICATE = -14; // duplicate entry
|
||||
|
||||
/** type for result code. */
|
||||
typedef int result_t;
|
||||
|
||||
Reference in New Issue
Block a user