corda/sgx-jvm/jvm-enclave/common/sgx_utilities.h
2017-03-24 18:23:04 +00:00

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); \
} \
}