2
0

Improve error handling for marshalling.

This commit is contained in:
Maarten Billemont
2017-08-03 01:07:19 -04:00
parent bb8829b66f
commit 434d70ebff
6 changed files with 168 additions and 177 deletions

View File

@@ -32,7 +32,7 @@ typedef enum( unsigned int, MPMarshallFormat ) {
MPMarshallFormatJSON,
};
typedef enum( unsigned int, MPMarshallError ) {
typedef enum( unsigned int, MPMarshallErrorType ) {
/** The marshalling operation completed successfully. */
MPMarshallSuccess,
/** An error in the structure of the marshall file interrupted marshalling. */
@@ -48,7 +48,10 @@ typedef enum( unsigned int, MPMarshallError ) {
/** An internal system error interrupted marshalling. */
MPMarshallErrorInternal,
};
const char *mpw_explainMarshallError(const MPMarshallError error);
typedef struct MPMarshallError {
MPMarshallErrorType type;
const char *description;
} MPMarshallError;
typedef struct MPMarshalledQuestion {
const char *keyword;