PageRenderTime 34ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/libs/poco/include/Poco/Error.h

http://github.com/openframeworks/openFrameworks
C Header | 54 lines | 17 code | 15 blank | 22 comment | 0 complexity | c4fcd2bdcb642c8f2d54f715f4bfeb64 MD5 | raw file
Possible License(s): LGPL-3.0, LGPL-2.1, MPL-2.0-no-copyleft-exception, GPL-2.0, GPL-3.0, BSD-3-Clause
  1. //
  2. // Error.h
  3. //
  4. // $Id: //poco/1.4/Foundation/include/Poco/Error.h#1 $
  5. //
  6. // Library: Foundation
  7. // Package: Core
  8. // Module: Error
  9. //
  10. // Definition of the Error class.
  11. //
  12. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
  13. // and Contributors.
  14. //
  15. // SPDX-License-Identifier: BSL-1.0
  16. //
  17. #ifndef Foundation_Error_INCLUDED
  18. #define Foundation_Error_INCLUDED
  19. #include "Poco/Foundation.h"
  20. namespace Poco {
  21. class Foundation_API Error
  22. /// The Error class provides utility functions
  23. /// for error reporting.
  24. {
  25. public:
  26. #ifdef POCO_OS_FAMILY_WINDOWS
  27. static DWORD last();
  28. /// Utility function returning the last error.
  29. static std::string getMessage(DWORD errorCode);
  30. /// Utility function translating numeric error code to string.
  31. #else
  32. static int last();
  33. /// Utility function returning the last error.
  34. static std::string getMessage(int errorCode);
  35. /// Utility function translating numeric error code to string.
  36. #endif
  37. };
  38. } // namespace Poco
  39. #endif // Foundation_Error_INCLUDED