00001 /****************** <VPR heading BEGIN do not edit this line> ***************** 00002 * 00003 * VR Juggler Portable Runtime 00004 * 00005 * Original Authors: 00006 * Allen Bierbaum, Patrick Hartling, Kevin Meinert, Carolina Cruz-Neira 00007 * 00008 * ----------------------------------------------------------------- 00009 * File: $RCSfile$ 00010 * Date modified: $Date: 2006-08-21 14:43:40 -0500 (Mon, 21 Aug 2006) $ 00011 * Version: $Revision: 19243 $ 00012 * ----------------------------------------------------------------- 00013 * 00014 ****************** <VPR heading END do not edit this line> ******************/ 00015 00016 /*************** <auto-copyright.pl BEGIN do not edit this line> ************** 00017 * 00018 * VR Juggler is (C) Copyright 1998-2005 by Iowa State University 00019 * 00020 * Original Authors: 00021 * Allen Bierbaum, Christopher Just, 00022 * Patrick Hartling, Kevin Meinert, 00023 * Carolina Cruz-Neira, Albert Baker 00024 * 00025 * This library is free software; you can redistribute it and/or 00026 * modify it under the terms of the GNU Library General Public 00027 * License as published by the Free Software Foundation; either 00028 * version 2 of the License, or (at your option) any later version. 00029 * 00030 * This library is distributed in the hope that it will be useful, 00031 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00032 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00033 * Library General Public License for more details. 00034 * 00035 * You should have received a copy of the GNU Library General Public 00036 * License along with this library; if not, write to the 00037 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00038 * Boston, MA 02111-1307, USA. 00039 * 00040 *************** <auto-copyright.pl END do not edit this line> ***************/ 00041 00042 #include <vpr/vprConfig.h> 00043 00044 #include <iostream> 00045 #include <prerror.h> 00046 #include <prerr.h> 00047 00048 #include <vpr/md/NSPR/NSPRHelpers.h> 00049 00050 00051 namespace vpr 00052 { 00053 00054 // Print out the current NSPR error message to the given output stream. 00055 void NSPR_PrintError(const std::string& errorPrefixString, std::ostream& out) 00056 { 00057 PRErrorCode err = PR_GetError(); 00058 const char* err_name = PR_ErrorToName(err); 00059 const char* err_str = PR_ErrorToString(err,0); 00060 00061 out << "Error (NSPR): " << errorPrefixString << "(" << err; 00062 00063 if ( err_name != NULL ) 00064 { 00065 out << ":" << err_name; 00066 } 00067 00068 if ( err_str != NULL ) 00069 { 00070 out << ", " << err_str; 00071 } 00072 00073 out << ")" << std::endl; 00074 } 00075 00076 } // namespace
1.5.1