sgx/enclaveshim_ecalls.c
/* Check error conditions for loading enclave */
Check error conditions for loading enclave
Check error conditions for loading enclave
void print_error_message(sgx_status_t ret, const char* fn)
{
    size_t idx = 0;
    size_t ttl = sizeof sgx_errlist/sizeof sgx_errlist[0];
    for (idx = 0; idx < ttl; idx++) {
        if(ret == sgx_errlist[idx].err) {
            if(NULL != sgx_errlist[idx].sug)
                printf("Info: %s from %s\n", sgx_errlist[idx].sug, fn);
            printf("Error: %s from %s\n", sgx_errlist[idx].msg, fn);
            break;
        }
    }
    if (idx == ttl)
        printf("Error: Unexpected error occurred: %d from %s.\n", ret, fn);
}
void print_error_message ( sgx_status_t ret , const char * fn ) { size_t idx = 0 ; size_t ttl = sizeof sgx_errlist / sizeof sgx_errlist [ 0 ] ; for ( idx = 0 ; idx < ttl ; idx ++ ) { if ( ret == sgx_errlist [ idx ] . err ) { if ( NULL != sgx_errlist [ idx ] . sug ) printf ( " \n " , sgx_errlist [ idx ] . sug , fn ) ; printf ( " \n " , sgx_errlist [ idx ] . msg , fn ) ; break ; } } if ( idx == ttl ) printf ( " \n " , ret , fn ) ; }
Check error conditions for loading enclave
Check error conditions for loading enclave