src/api/transport/error.cpp¶
Functions¶
| Name | |
|---|---|
| OUTCOME_CPP_DEFINE_CATEGORY_3(sgns::api , ApiTransportError , e ) |
Functions Documentation¶
function OUTCOME_CPP_DEFINE_CATEGORY_3¶
Source code¶
#include "api/transport/error.hpp"
OUTCOME_CPP_DEFINE_CATEGORY_3(sgns::api, ApiTransportError, e) {
using sgns::api::ApiTransportError;
switch (e) {
case ApiTransportError::FAILED_SET_OPTION:
return "cannot set an option";
case ApiTransportError::FAILED_START_LISTENING:
return "cannot start listening, invalid address or port is busy";
case ApiTransportError::LISTENER_ALREADY_STARTED:
return "cannot start listener, already started";
case ApiTransportError::CANNOT_ACCEPT_LISTENER_NOT_WORKING:
return "cannot accept new connection, state mismatch";
}
return "unknown transport error";
}
Updated on 2026-03-04 at 13:10:44 -0800