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
12namespace Cantera {
13/// Logger that doesn't exit when an error is thrown.
14/// @ingroup textlogs
15class NoExitLogger : public Logger {
16public:
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
Base class for 'loggers' that write text messages to log files.
Definition: logger.h:41
Logger that doesn't exit when an error is thrown.
Definition: NoExitLogger.h:15
virtual void error(const std::string &msg)
Write an error message and quit.
Definition: NoExitLogger.h:20
Header for Base class for 'loggers' that write text messages to log files (see Writing messages to th...
Namespace for the Cantera kernel.
Definition: AnyMap.h:29