| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
// |
|
2
|
|
|
|
|
|
|
// Copyright (c) 2017 James E. King III |
|
3
|
|
|
|
|
|
|
// |
|
4
|
|
|
|
|
|
|
// Distributed under the Boost Software License, Version 1.0. |
|
5
|
|
|
|
|
|
|
// (See accompanying file LICENSE_1_0.txt or copy at |
|
6
|
|
|
|
|
|
|
// http://www.boost.org/LICENCE_1_0.txt) |
|
7
|
|
|
|
|
|
|
// |
|
8
|
|
|
|
|
|
|
// Entropy error class |
|
9
|
|
|
|
|
|
|
// |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#ifndef BOOST_UUID_RANDOM_ENTROPY_ERROR_HPP |
|
12
|
|
|
|
|
|
|
#define BOOST_UUID_RANDOM_ENTROPY_ERROR_HPP |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#include |
|
15
|
|
|
|
|
|
|
#include |
|
16
|
|
|
|
|
|
|
#include |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
namespace boost { |
|
19
|
|
|
|
|
|
|
namespace uuids { |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
//! \brief Given boost::system::system_error is in a module that |
|
22
|
|
|
|
|
|
|
//! is not header-only, we define our own exception type |
|
23
|
|
|
|
|
|
|
//! to handle entropy provider errors instead, |
|
24
|
0
|
0
|
|
|
|
|
class entropy_error : public std::runtime_error |
|
25
|
|
|
|
|
|
|
{ |
|
26
|
|
|
|
|
|
|
public: |
|
27
|
0
|
|
|
|
|
|
entropy_error(boost::intmax_t errCode, const std::string& message) |
|
28
|
|
|
|
|
|
|
: std::runtime_error(message) |
|
29
|
0
|
|
|
|
|
|
, m_errcode(errCode) |
|
30
|
|
|
|
|
|
|
{ |
|
31
|
0
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
virtual boost::intmax_t errcode() const |
|
34
|
|
|
|
|
|
|
{ |
|
35
|
0
|
|
|
|
|
|
return m_errcode; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
private: |
|
39
|
|
|
|
|
|
|
boost::intmax_t m_errcode; |
|
40
|
|
|
|
|
|
|
}; |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
} // uuids |
|
43
|
|
|
|
|
|
|
} // boost |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
#endif // BOOST_UUID_RANDOM_ENTROPY_ERROR_HPP |