mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
20 lines
363 B
C
20 lines
363 B
C
|
#pragma once
|
||
|
|
||
|
#include <cstdlib>
|
||
|
|
||
|
typedef struct {
|
||
|
sgx_status_t err;
|
||
|
const char *message;
|
||
|
const char *suggestion;
|
||
|
} sgx_errlist_t;
|
||
|
|
||
|
/* Check error conditions for loading enclave */
|
||
|
void print_error_message(sgx_status_t ret);
|
||
|
|
||
|
#define CHECK_SGX(cmd) { sgx_status_t ret = cmd; \
|
||
|
if (ret != SGX_SUCCESS) { \
|
||
|
print_error_message(ret); \
|
||
|
exit(-1); \
|
||
|
} \
|
||
|
}
|