|
Reckon 0.5.1-dev
A Tool to Count Logical Lines of Code
|
The result status type of an operation indicating success or failure. More...
#include <reckon/reckon.h>
Data Fields | |
| RcnErrorCode | errorCode |
| The error code indicating the type of error that has occurred. | |
| const char * | errorMessage |
| An optional error message describing the encountered error. | |
| bool | ok |
| Whether the operation has completed without critical errors. | |
The result status type of an operation indicating success or failure.
Count operations return result types that contain this type of state. For a single operation, e.g. rcnCountLogicalLines(), an ok value of true indicates that the operation was fully successful, implying that errorCode is set to RCN_ERR_NONE and errorMessage is NULL. Therefore, if ok is false, then errorCode indicates the type of error that has occurred and errorMessage may or may not be set to provide additional information. For compound operations, e.g. rcnCount(), an ok value of true indicates that the operation was at least partially successful and parts of the computed compound result are usable. In such a case, errorCode may still indicate one of the encountered errors, usually the last encountered one, and errorMessage may or may not provide more information. This implies that for compound operations an ok value of true might only indicate that no critical error has occurred.
| RcnErrorCode RcnResultState::errorCode |
The error code indicating the type of error that has occurred.
Is either RCN_ERR_NONE if no error was detected, or set to an appropriate error code.
| const char* RcnResultState::errorMessage |
An optional error message describing the encountered error.
Messages are not strictly guaranteed to be presentable to end users, as they may contain technical details. May be NULL. A user does not take ownership of the string and must not attempt to free it.
| bool RcnResultState::ok |
Whether the operation has completed without critical errors.
Is initialized as false and only set to true if the last performed operation was fully or partially successful. Therefore, it remains false if the underlying entity was not processed for any reason. Indicates full success for single operations and potentially partial success without critical errors for compound operations.