Belle II Software  release-08-01-10
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 
10 using namespace Belle2;
11 
12 Exception::Exception()
13  : m_comment(""), m_err(0)
14 {
15 }
16 
17 Exception::Exception(const std::string& comment)
18  : m_comment(comment), m_err(0)
19 {
20 }
21 
22 Exception::Exception(const std::string& comment,
23  int err)
24  : m_comment(comment), m_err(err)
25 {
26 }
27 
28 #if __GNUC__ >= 7
29 const char* Exception::what() const noexcept
30 #else
31 const char* Exception::what() const throw()
32 #endif
33 {
34  return m_comment.c_str();
35 }
Abstract base class for different kinds of events.