ConsoleErrorHandler.cpp

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020                                                                         
00021 // $Revision: 1.2 $
00022 // $Date: 2003/02/14 23:01:24 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/handler/ConsoleErrorHandler.cpp,v $
00024                                                                         
00025                                                                         
00026 // File: ~/handler/ConsoleErrorHandler.C
00027 //
00028 // Written: fmk 
00029 // Created: 11/99
00030 // Revision: A
00031 //
00032 // Description: This file contains the class implementation for ConsoleErrorHandler.
00033 //
00034 // What: "@(#) ConsoleErrorHandler.C, revA"
00035 
00036 #include "ConsoleErrorHandler.h"
00037 #include <stdlib.h>
00038 
00039 ConsoleErrorHandler::ConsoleErrorHandler()
00040   :ErrorHandler()
00041 {
00042 
00043 }
00044 
00045 ConsoleErrorHandler::~ConsoleErrorHandler()
00046 {
00047     // does nothing
00048 }
00049  
00050 
00051 void 
00052 ConsoleErrorHandler::warning(const char *msg, ...)
00053 {
00054   va_list args;
00055   va_start(args, msg);
00056   this->outputMessage(std::cerr, msg, args);
00057   va_end(args);
00058 }  
00059 
00060 void 
00061 ConsoleErrorHandler::fatal(const char *msg, ...)
00062 {
00063   va_list args;
00064   va_start(args, msg);
00065   this->outputMessage(std::cerr, msg, args);
00066   va_end(args);
00067   exit(-1);
00068 }

Generated on Mon Oct 23 15:05:12 2006 for OpenSees by doxygen 1.5.0