error.h 597 B

123456789101112131415161718192021
  1. // SPDX-FileCopyrightText: 2013 Dolphin Emulator Project
  2. // SPDX-FileCopyrightText: 2014 Citra Emulator Project
  3. // SPDX-License-Identifier: GPL-2.0-or-later
  4. #pragma once
  5. #include <string>
  6. namespace Common {
  7. // Generic function to get last error message.
  8. // Call directly after the command or use the error num.
  9. // This function might change the error code.
  10. // Defined in error.cpp.
  11. [[nodiscard]] std::string GetLastErrorMsg();
  12. // Like GetLastErrorMsg(), but passing an explicit error code.
  13. // Defined in error.cpp.
  14. [[nodiscard]] std::string NativeErrorToString(int e);
  15. } // namespace Common