Ardour
8.12
exception.h
Go to the documentation of this file.
1
#ifndef AUDIOGRAPHER_EXCEPTION_H
2
#define AUDIOGRAPHER_EXCEPTION_H
3
4
#include <exception>
5
#include <string>
6
7
#include <boost/format.hpp>
8
9
#include "
audiographer/visibility.h
"
10
#include "
audiographer/debug_utils.h
"
11
12
namespace
AudioGrapher
13
{
14
18
class
LIBAUDIOGRAPHER_API
Exception
:
public
std::exception
19
{
20
public
:
21
template
<
typename
T>
22
Exception
(T
const
& thrower, std::string
const
& reason)
23
: reason (boost::str (boost::format
24
(
"Exception thrown by %1%: %2%"
)
25
%
DebugUtils
::
demangled_name
(thrower) % reason))
26
{}
27
28
virtual
~Exception
() throw() { }
29
30
const
char
*
what
()
const
throw()
31
{
32
return
reason.c_str();
33
}
34
35
private
:
36
std::string
const
reason
;
37
38
};
39
40
}
// namespace AudioGrapher
41
42
#endif
// AUDIOGRAPHER_EXCEPTION_H
visibility.h
LIBAUDIOGRAPHER_API
#define LIBAUDIOGRAPHER_API
Definition:
audiographer/audiographer/visibility.h:39
AudioGrapher::Exception
Definition:
exception.h:19
AudioGrapher::Exception::Exception
Exception(T const &thrower, std::string const &reason)
Definition:
exception.h:22
AudioGrapher::Exception::what
const char * what() const
Definition:
exception.h:30
AudioGrapher::Exception::~Exception
virtual ~Exception()
Definition:
exception.h:28
AudioGrapher::Exception::reason
std::string const reason
Definition:
exception.h:36
debug_utils.h
AudioGrapher
Definition:
analysis_graph.h:34
PBD::demangled_name
std::string demangled_name(T const &obj)
Definition:
demangle.h:46
AudioGrapher::DebugUtils
Utilities for debugging.
Definition:
debug_utils.h:21
libs
audiographer
audiographer
exception.h
Generated on Mon Mar 10 2025 20:26:21 for Ardour by
1.9.1