-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathexceptions.hpp
More file actions
36 lines (32 loc) · 772 Bytes
/
exceptions.hpp
File metadata and controls
36 lines (32 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include <stdexcept>
namespace burda
{
namespace function_loader
{
namespace exceptions
{
struct library_load_failed : public std::runtime_error
{
explicit library_load_failed(const std::string & path)
: std::runtime_error{"Could not load library (or its dependencies) at path " + path }
{
}
};
struct library_handle_invalid : public std::runtime_error
{
explicit library_handle_invalid()
: std::runtime_error{ "Library handle is invalid (might be caused by using instance after is has been moved)" }
{
}
};
struct function_does_not_exist : public std::logic_error
{
explicit function_does_not_exist(const std::string & name)
: std::logic_error{ "Could not load function " + name }
{
}
};
}
}
}