/* * (C) 2017 The University of Chicago * * See COPYRIGHT in top-level directory. */#include <margo.h>#include <thallium/margo_exception.hpp>namespacethallium{std::stringtranslate_margo_error_code(hg_return_tret){switch(ret){caseHG_SUCCESS:/*!< operation succeeded */return"HG_SUCCESS";caseHG_NA_ERROR:/*!< error in NA layer */return"HG_NA_ERROR";caseHG_TIMEOUT:/*!< reached timeout */return"HG_TIMEOUT";caseHG_INVALID_PARAM:/*!< invalid parameter */return"HG_INVALID_PARAM";caseHG_SIZE_ERROR:/*!< size error */return"HG_SIZE_ERROR";caseHG_NOMEM_ERROR:/*!< no memory error */return"HG_NOMEM_ERROR";caseHG_PROTOCOL_ERROR:/*!< protocol does not match */return"HG_PROTOCOL_ERROR";caseHG_NO_MATCH:/*!< no function match */return"HG_NO_MATCH";caseHG_CHECKSUM_ERROR:/*!< checksum error */return"HG_CHECKSUM_ERROR";caseHG_CANCELED:/*!< operation was canceled */return"HG_CANCELED";caseHG_OTHER_ERROR:/*!< error from mercury_util or external to mercury */return"HG_OTHER_ERROR";}return"Unknown error";}}