0.4.00.4.10.4.2
|
Last change
on this file since de7ec29 was
de7ec29,
checked in by Michael Medin <michael@…>, 3 years ago
|
|
Fixed some unix incompatibility issues
|
-
Property mode set to
100644
|
|
File size:
1.6 KB
|
| Line | |
|---|
| 1 | #pragma once
|
|---|
| 2 | #include <unicode_char.hpp>
|
|---|
| 3 | #include <string>
|
|---|
| 4 | #include <strEx.h>
|
|---|
| 5 |
|
|---|
| 6 | using namespace nscp::helpers;
|
|---|
| 7 |
|
|---|
| 8 | namespace error {
|
|---|
| 9 | class format {
|
|---|
| 10 | public:
|
|---|
| 11 | static std::wstring from_system(int dwError) {
|
|---|
| 12 | char buf [1024];
|
|---|
| 13 | return nscp::helpers::to_wstring(::strerror_r(dwError, buf, sizeof (buf)));
|
|---|
| 14 | }
|
|---|
| 15 | static std::wstring from_module(std::wstring module, unsigned long dwError) {
|
|---|
| 16 | return _T("ERROR TODO");
|
|---|
| 17 | }
|
|---|
| 18 | static std::wstring from_module(std::wstring module, unsigned long dwError, unsigned long *arguments) {
|
|---|
| 19 | return _T("ERROR TODO");
|
|---|
| 20 | }
|
|---|
| 21 | class message {
|
|---|
| 22 | public:
|
|---|
| 23 | static std::wstring from_module(std::wstring module, unsigned long dwError) {
|
|---|
| 24 | return _T("ERROR TODO");
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | static std::wstring from_module_x64(std::wstring module, unsigned long dwError, wchar_t* argList[], unsigned long argCount) {
|
|---|
| 28 | return _T("ERROR TODO");
|
|---|
| 29 | }
|
|---|
| 30 | private:
|
|---|
| 31 |
|
|---|
| 32 | static std::wstring from_module_wrapper(std::wstring module, unsigned long dwError, ...) {
|
|---|
| 33 | return _T("ERROR TODO");
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | static std::wstring __from_module(std::wstring module, unsigned long dwError, va_list *arguments) {
|
|---|
| 37 | return _T("ERROR TODO");
|
|---|
| 38 | }
|
|---|
| 39 | public:
|
|---|
| 40 | static std::wstring from_system(unsigned long dwError, unsigned long *arguments) {
|
|---|
| 41 | return _T("ERROR TODO");
|
|---|
| 42 | }
|
|---|
| 43 | };
|
|---|
| 44 | };
|
|---|
| 45 | class lookup {
|
|---|
| 46 | public:
|
|---|
| 47 | static std::wstring last_error(int dwLastError = -1) {
|
|---|
| 48 | return ::error::format::from_system(dwLastError);
|
|---|
| 49 | }
|
|---|
| 50 | static std::string last_error_ansi(int dwLastError = -1) {
|
|---|
| 51 | return nscp::helpers::to_string(::error::format::from_system(dwLastError));
|
|---|
| 52 | }
|
|---|
| 53 | };
|
|---|
| 54 | }
|
|---|
Note: See
TracBrowser
for help on using the repository browser.