Belle II Software development
Exception.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include "daq/slc/base/Exception.h"
9
10using namespace Belle2;
11
12Exception::Exception()
13 : m_comment(""), m_err(0)
14{
15}
16
17Exception::Exception(const std::string& comment)
18 : m_comment(comment), m_err(0)
19{
20}
21
22Exception::Exception(const std::string& comment,
23 int err)
24 : m_comment(comment), m_err(err)
25{
26}
27
28#if __GNUC__ >= 7
29const char* Exception::what() const noexcept
30#else
31const char* Exception::what() const throw()
32#endif
33{
34 return m_comment.c_str();
35}
Abstract base class for different kinds of events.