Show
Ignore:
Timestamp:
12/15/09 16:09:34 (3 years ago)
Author:
saturday06
Message:

asudf

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/os-unix/Debug.h

    r34849 r36141  
    1313    string file; 
    1414    int line; 
     15    int last_errno; 
    1516    bool will_abort; 
    1617public: 
     
    2122        return *this; 
    2223    } 
    23     Logger(const char* file, int line, bool will_abort = false) 
    24             : file(file), line(line), will_abort(will_abort) { 
     24    Logger(const char* file, int line, int last_errno, bool will_abort = false) 
     25            : file(file), line(line), last_errno(last_errno), will_abort(will_abort) { 
    2526    } 
    2627    ~Logger() { 
    27         cout << data.str() << "," << file << ":" << line << endl; 
     28 
     29        cout << data.str() << "," << file << ":" << line << ",errno=" << last_errno << "\"" << strerror(last_errno) << "\"" << endl; 
    2830        //cout << data.str() << flush; 
    2931        if (will_abort) {