1
0
forked from fsfw/fsfw

revamed and imroved error handling

This commit is contained in:
2021-01-08 15:10:33 +01:00
parent 5a8647d367
commit f2ecd6d740
2 changed files with 131 additions and 67 deletions

View File

@ -56,7 +56,7 @@ class LocalDataPoolManager {
public:
static constexpr uint8_t INTERFACE_ID = CLASS_ID::HOUSEKEEPING_MANAGER;
static constexpr ReturnValue_t QUEUE_OR_DESTINATION_NOT_SET = MAKE_RETURN_CODE(0);
static constexpr ReturnValue_t QUEUE_OR_DESTINATION_INVALID = MAKE_RETURN_CODE(0);
static constexpr ReturnValue_t WRONG_HK_PACKET_TYPE = MAKE_RETURN_CODE(1);
static constexpr ReturnValue_t REPORTING_STATUS_UNCHANGED = MAKE_RETURN_CODE(2);
@ -370,6 +370,15 @@ private:
ReturnValue_t& status);
ReturnValue_t addUpdateToStore(HousekeepingPacketUpdate& updatePacket,
store_address_t& storeId);
enum class ErrorTypes {
WARNING_TYPE,
ERROR_TYPE
};
void printWarningOrError(ErrorTypes errorType, const char* functionName,
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
const char* errorPrint = nullptr);
};