Cantera 2.6.0

NoExitLogger.h
Go to the documentation of this file.
1//! @file NoExitLogger.h
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
6#ifndef NOEXITLOGGER_H
7#define NOEXITLOGGER_H
8
9#include <string>
10#include "cantera/base/logger.h"
11
12 namespace Cantera {
13/// Logger that doesn't exit when an error is thrown.
14/// @ingroup textlogs
15 class NoExitLogger : public Logger {
16 public:
17 NoExitLogger() {}
18 virtual ~NoExitLogger() {}
19
20 virtual void error(const std::string& msg)
21 {
22 std::cerr << msg << std::endl;
23 }
24};
25}
26#endif
Cantera::Logger
Base class for 'loggers' that write text messages to log files.
Definition: logger.h:41
Cantera::NoExitLogger
Logger that doesn't exit when an error is thrown.
Definition: NoExitLogger.h:15
Cantera::NoExitLogger::error
virtual void error(const std::string &msg)
Write an error message and quit.
Definition: NoExitLogger.h:20
logger.h
Header for Base class for 'loggers' that write text messages to log files (see Writing messages to th...
Cantera
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:557