2
// Copyright � 1997 - 2001, Paul C. Gregory
4
// Contact: pgregory@aqsis.com
6
// This library is free software; you can redistribute it and/or
7
// modify it under the terms of the GNU Lesser General Public
8
// License as published by the Free Software Foundation; either
9
// version 2.1 of the License, or (at your option) any later version.
11
// This library is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
// General Public License for more details.
16
// You should have received a copy of the GNU General Public
17
// License along with this library; if not, write to the Free Software
18
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
* \brief Error reporting class implementation.
22
* \author Lionel J. Lacour (intuition01@online.fr)
29
/// Storage for the last error number reported.
32
/// Default implementation of ignore error handler.
33
RtVoid RiErrorIgnore( RtInt cd, RtInt sev, const char *msg )
35
/// Default implementation of print error handler.
37
RtVoid RiErrorPrint( RtInt cd, RtInt sev, const char *msg )
39
/// Default implementation of abort error handler.
41
RtVoid RiErrorAbort( RtInt cd, RtInt sev, const char *msg )
45
USING_NAMESPACE( libri2rib );
47
RtVoid CqError::manage ()
50
std::cerr << "RI2RIB: " << m_Message1 << m_Message2 << m_Message3 << std::endl;
51
if ( m_Severity == RIE_SEVERE ) exit( EXIT_FAILURE );
53
if ( m_ToRib == TqTrue )
58
case RIE_INFO: tmp = std::string( "INFO: " ); break;
59
case RIE_WARNING: tmp = std::string( "WARNING: " ); break;
60
case RIE_ERROR: tmp = std::string( "ERROR: " ); break;
63
tmp += m_Message1 + m_Message2 + m_Message3;
64
RiArchiveRecord( RI_COMMENT, const_cast<char *> ( tmp.c_str() ) );