Belle II Software development
TimeoutException.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/TimeoutException.h"
9
10#include <cstdarg>
11#include <cstdio>
12
13using namespace Belle2;
14
15TimeoutException::TimeoutException(const std::string& format, ...)
16{
17 va_list ap;
18 char ss[1024 * 100];
19 va_start(ap, format);
20 vsnprintf(ss, sizeof(ss), format.c_str(), ap);
21 va_end(ap);
22 m_comment = ss;
23}
24
25TimeoutException::TimeoutException(int err, const std::string& format, ...)
26{
27 m_err = err;
28 va_list ap;
29 char ss[1024 * 100];
30 va_start(ap, format);
31 vsnprintf(ss, sizeof(ss), format.c_str(), ap);
32 va_end(ap);
33 m_comment = ss;
34}
35
Abstract base class for different kinds of events.