Changeset d05c3f0 in nscp for include/error_impl_unix.hpp


Ignore:
Timestamp:
11/15/09 17:20:03 (4 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2
Children:
92c4b5b
Parents:
3eedfa6
Message:

Next major "milestone" we now have one working plugin (CheckHelpers) which loads and works both on Linux and Windows.
This is (as always) a broken build which many many features disabled and non functional...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/error_impl_unix.hpp

    r7f9c823 rd05c3f0  
    66  class format { 
    77  public: 
    8     static std::wstring from_system(unsigned long dwError) { 
    9       return _T("ERROR TODO"); 
     8    static std::wstring from_system(int dwError) { 
     9      char buf [1024]; 
     10      return to_wstring(::strerror_r(dwError, buf, sizeof (buf))); 
    1011    } 
    1112    static std::wstring from_module(std::wstring module, unsigned long dwError) { 
     
    4142  class lookup { 
    4243  public: 
    43     static std::wstring last_error(unsigned long dwLastError = -1) { 
    44       return _T("ERROR TODO"); 
     44    static std::wstring last_error(int dwLastError = -1) { 
     45      return ::error::format::from_system(dwLastError); 
    4546    } 
    46     static std::string last_error_ansi(unsigned long dwLastError = -1) { 
    47       return "ERROR TODO"; 
     47    static std::string last_error_ansi(int dwLastError = -1) { 
     48      return to_string(::error::format::from_system(dwLastError)); 
    4849    } 
    4950  }; 
Note: See TracChangeset for help on using the changeset viewer.