コード例 #1
0
ファイル: test_error_handler.cpp プロジェクト: axlrose/etl
  //***************************************************************************
  // A member error handler function.
  //***************************************************************************
  void receive_error(const etl::exception& e)
  {
    error_received = true;
    std::ostringstream oss;
    oss << "Error '" << e.what() << "' in " << e.file_name() << " at line " << e.line_number() << "\n";

    std::string stext = oss.str();

    WCHAR text[200];
    MultiByteToWideChar(0, 0, stext.c_str(), stext.size() + 1, text, 200);
    LPCWSTR ltext = text;

    OutputDebugString(ltext);
  }
コード例 #2
0
ファイル: test_error_handler.cpp プロジェクト: ownmac/stm32f2
    //***************************************************************************
    // A member error handler function.
    //***************************************************************************
    void receive_error(const etl::exception& e)
    {
        error_received = true;
        std::ostringstream oss;
        oss << "Error '" << e.what() << "' in " << e.file_name() << " at line " << e.line_number() << "\n";

#if defined(PLATFORM_WINDOWS) && defined(COMPILER_MICROSOFT)
        std::string stext = oss.str();

        WCHAR text[200];
        MultiByteToWideChar(0, 0, stext.c_str(), stext.size() + 1, text, 200);
        LPCWSTR ltext = text;

        OutputDebugString(ltext);
#endif
    }