apps/socketAPI_microbench/sgxserver_thread.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)
{
        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\n", sgx_errlist[idx].sug);
                        printf("Error: %s\n", sgx_errlist[idx].msg);
                        break;
                }
        }
        if (idx == ttl)
                printf("Error: Unexpected error occurred: %d.\n", ret);
}
void print_error_message ( sgx_status_t ret ) { 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 ) ; printf ( " \n " , sgx_errlist [ idx ] . msg ) ; break ; } } if ( idx == ttl ) printf ( " \n " , ret ) ; }
Check error conditions for loading enclave
Check error conditions for loading enclave