• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.8
    All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    Exception.hpp File Reference

    Go to the source code of this file.

    Classes

    class  dw::framework::Exception
     

    Namespaces

    namespace  dw
     
    namespace  dw::framework
     

    Macros

    #define FRWK_CHECK_CUDA_ERROR(x)
     
    #define FRWK_CHECK_CUDA_ERROR_NOTHROW(x)
     
    #define FRWK_CHECK_DW_ERROR(x)
     
    #define FRWK_CHECK_DW_ERROR_IGNORE_SOME(x, fallback, ...)
     
    #define FRWK_CHECK_DW_ERROR_MSG(x, description)
     
    #define FRWK_CHECK_DW_ERROR_NOTHROW(x)
     
    #define FRWK_CHECK_DW_ERROR_NOTHROW_IGNORE_SOME(x, fallback, ...)
     
    #define FRWK_CHECK_NVMEDIA_ERROR(e)
     
    #define FRWK_CHECK_NVSCI_ERROR(e)
     
    #define GET_STRING(s)   #s
     
    #define THROW_ON_PARAM_NULL(param)
     

    Functions

    const char * dw::framework::nvSciGetErrorName (uint32_t error)
     
    const char * dw::framework::nvSciGetEventName (uint32_t event)
     

    Macro Definition Documentation

    ◆ FRWK_CHECK_CUDA_ERROR

    #define FRWK_CHECK_CUDA_ERROR (   x)
    Value:
    { \
    x; \
    auto result = cudaGetLastError(); \
    if (result != cudaSuccess) \
    { \
    throw dw::framework::Exception(DW_CUDA_ERROR, cudaGetErrorString(result)); \
    } \
    };

    Definition at line 340 of file Exception.hpp.

    ◆ FRWK_CHECK_CUDA_ERROR_NOTHROW

    #define FRWK_CHECK_CUDA_ERROR_NOTHROW (   x)
    Value:
    { \
    x; \
    auto result = cudaGetLastError(); \
    if (result != cudaSuccess) \
    { \
    DW_LOGE << __FILE__ \
    << "(" << __LINE__ << ") " \
    << "CUDA error but not thrown: " \
    << cudaGetErrorString(result) \
    << dw::core::Logger::State::endl; \
    } \
    };

    Definition at line 350 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR

    #define FRWK_CHECK_DW_ERROR (   x)
    Value:
    { \
    dwStatus result = x; \
    if (result != DW_SUCCESS) \
    { \
    throw dw::framework::Exception(result, __FILE__, ":", __LINE__, " - DriveWorks Error"); \
    } \
    };

    Definition at line 263 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR_IGNORE_SOME

    #define FRWK_CHECK_DW_ERROR_IGNORE_SOME (   x,
      fallback,
      ... 
    )
    Value:
    { \
    dwStatus result = x; \
    dwStatus ignoreErros[] = {__VA_ARGS__}; \
    if (result != DW_SUCCESS) \
    { \
    if (std::find(std::begin(ignoreErros), std::end(ignoreErros), result) != std::end(ignoreErros)) \
    { \
    DW_LOGD << __FILE__ \
    << "(" << __LINE__ << ") " \
    << "Ignoring Error: " \
    << dwGetStatusName(result) << ". Falling back on calling " << GET_STRING(fallback) \
    << dw::core::Logger::State::endl; \
    result = fallback; \
    if (result != DW_SUCCESS) \
    { \
    throw dw::framework::Exception(result, "After ignoring errors from ignore list, fallback operation %s encountered DriveWorks error.", GET_STRING(fallback)); \
    } \
    } \
    } \
    if (result != DW_SUCCESS) \
    { \
    throw dw::framework::Exception(result, "DriveWorks error not in ignore list."); \
    } \
    };
    #define GET_STRING(s)
    Definition: Exception.hpp:271

    Definition at line 272 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR_MSG

    #define FRWK_CHECK_DW_ERROR_MSG (   x,
      description 
    )
    Value:
    { \
    dwStatus result = (x); \
    if (result != DW_SUCCESS) \
    { \
    throw dw::framework::Exception(result, (description)); \
    } \
    };

    Definition at line 329 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR_NOTHROW

    #define FRWK_CHECK_DW_ERROR_NOTHROW (   x)
    Value:
    { \
    dwStatus result = x; \
    if (result != DW_SUCCESS) \
    { \
    DW_LOGE << __FILE__ \
    << "(" << __LINE__ << ") " \
    << "DriveWorks exception but not thrown: " \
    << dwGetStatusName(result) \
    << dw::core::Logger::State::endl; \
    } \
    };

    Definition at line 298 of file Exception.hpp.

    ◆ FRWK_CHECK_DW_ERROR_NOTHROW_IGNORE_SOME

    #define FRWK_CHECK_DW_ERROR_NOTHROW_IGNORE_SOME (   x,
      fallback,
      ... 
    )
    Value:
    { \
    dwStatus result = x; \
    dwStatus ignoreErros[] = {__VA_ARGS__}; \
    if (std::find(std::begin(ignoreErros), std::end(ignoreErros), result) != std::end(ignoreErros)) \
    { \
    result = fallback; \
    } \
    if (result != DW_SUCCESS) \
    { \
    DW_LOGE << __FILE__ \
    << "(" << __LINE__ << ") " \
    << "DriveWorks exception but not thrown: " \
    << dwGetStatusName(result) \
    << dw::core::Logger::State::endl; \
    } \
    };

    Definition at line 311 of file Exception.hpp.

    ◆ FRWK_CHECK_NVMEDIA_ERROR

    #define FRWK_CHECK_NVMEDIA_ERROR (   e)
    Value:
    { \
    auto FRWK_CHECK_NVMEDIA_ERROR_ret = (e); \
    if (FRWK_CHECK_NVMEDIA_ERROR_ret != NVMEDIA_STATUS_OK) \
    { \
    throw dw::framework::Exception(DW_NVMEDIA_ERROR, "NvMedia error occured"); \
    } \
    }

    Definition at line 364 of file Exception.hpp.

    ◆ FRWK_CHECK_NVSCI_ERROR

    #define FRWK_CHECK_NVSCI_ERROR (   e)
    Value:
    { \
    auto FRWK_CHECK_NVSCI_ERROR_ret = (e); \
    if (FRWK_CHECK_NVSCI_ERROR_ret != NvSciError_Success) \
    { \
    DW_LOGE << "Failed with " << nvSciGetErrorName(FRWK_CHECK_NVSCI_ERROR_ret) \
    << "(" << FRWK_CHECK_NVSCI_ERROR_ret << ")" \
    << " in " << __FILE__ \
    << ":" << __LINE__ << Logger::State::endl; \
    if (FRWK_CHECK_NVSCI_ERROR_ret == NvSciError_Timeout) \
    throw Exception(DW_TIME_OUT, "NvSci API Timeout"); \
    else \
    throw Exception(DW_INTERNAL_ERROR, "NvSci internal error occured"); \
    } \
    }
    const char * nvSciGetErrorName(uint32_t error)

    Definition at line 373 of file Exception.hpp.

    ◆ GET_STRING

    #define GET_STRING (   s)    #s

    Definition at line 271 of file Exception.hpp.

    ◆ THROW_ON_PARAM_NULL

    #define THROW_ON_PARAM_NULL (   param)
    Value:
    if (param == nullptr) \
    { \
    throw dw::framework::Exception(DW_INVALID_ARGUMENT, #param " == nullptr ", DW_FUNCTION_NAME, ":", __LINE__); \
    }

    Definition at line 40 of file Exception.hpp.

    人人超碰97caoporen国产