vpr::ErrorImplNSPR Class Reference

NSPR Implementation of a cross-platform error reporting class. More...

#include <vpr/Util/Error.h>

Inheritance diagram for vpr::ErrorImplNSPR:

Inheritance graph
[legend]
Collaboration diagram for vpr::ErrorImplNSPR:

Collaboration graph
[legend]
List of all members.

Static Public Member Functions

static void outputCurrentError (std::ostream &out, const std::string &prefix)
static ErrorType getCurrentError ()

Static Protected Member Functions

static PRErrorCode convertErrorVprToNspr (ErrorType mask)
static ErrorType convertErrorNsprToVpr (PRErrorCode mask)

Detailed Description

NSPR Implementation of a cross-platform error reporting class.

Definition at line 58 of file ErrorImplNSPR.h.


Member Function Documentation

static void vpr::ErrorImplNSPR::outputCurrentError ( std::ostream &  out,
const std::string &  prefix 
) [inline, static]

Reimplemented from vpr::ErrorBase.

Definition at line 62 of file ErrorImplNSPR.h.

00063    {
00064       PRErrorCode  err = PR_GetError();
00065       const char* err_name = PR_ErrorToName(err);
00066       const char* err_str = PR_ErrorToString(err,0);
00067    
00068       /*
00069       int os_err = PR_GetOSError();
00070       char* os_str = strerror(PR_GetOSError());
00071       */
00072    
00073       out << "Error (NSPR): " << prefix << " (" << err;
00074       if(err_name != NULL)
00075       {
00076           out << ":" << err_name;
00077       } 
00078 
00079       if(err_str != NULL)
00080       {
00081           out << ", " << err_str;
00082       }
00083       out << ")" << std::endl;
00084    }

static ErrorType vpr::ErrorImplNSPR::getCurrentError (  )  [inline, static]

Reimplemented from vpr::ErrorBase.

Definition at line 86 of file ErrorImplNSPR.h.

00087    {
00088       return NoError;
00089    }

static PRErrorCode vpr::ErrorImplNSPR::convertErrorVprToNspr ( ErrorType  mask  )  [inline, static, protected]

Definition at line 92 of file ErrorImplNSPR.h.

00093    {
00094       return PR_MAX_ERROR;
00095    }

static ErrorType vpr::ErrorImplNSPR::convertErrorNsprToVpr ( PRErrorCode  mask  )  [inline, static, protected]

Definition at line 97 of file ErrorImplNSPR.h.

00098    {
00099       return NoError;
00100    }


The documentation for this class was generated from the following file:
Generated on Thu Jan 4 10:55:31 2007 for VR Juggler Portable Runtime by  doxygen 1.5.1