forked from libbitcoin/libbitcoin-database
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patherror.hpp
More file actions
160 lines (139 loc) · 3.19 KB
/
error.hpp
File metadata and controls
160 lines (139 loc) · 3.19 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/**
* Copyright (c) 2011-2026 libbitcoin developers (see AUTHORS)
*
* This file is part of libbitcoin.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBBITCOIN_DATABASE_ERROR_HPP
#define LIBBITCOIN_DATABASE_ERROR_HPP
#include <bitcoin/system.hpp>
#include <bitcoin/database/define.hpp>
namespace libbitcoin {
namespace database {
/// Alias system code.
/// std::error_code "database" category holds database::error::error_t.
typedef std::error_code code;
namespace error {
enum error_t : uint8_t
{
/// general
success,
canceled,
unknown_state,
/// integrity (internal fault)
integrity,
integrity1,
integrity2,
integrity3,
integrity4,
integrity5,
integrity6,
integrity7,
integrity8,
integrity9,
////integrity10,
/// memory map
open_open,
size_failure,
close_loaded,
load_loaded,
load_locked,
load_failure,
reload_unloaded,
reload_locked,
flush_unloaded,
flush_failure,
unload_locked,
unload_failure,
/// mmap
disk_full,
mmap_failure,
mremap_failure,
munmap_failure,
madvise_failure,
sysconf_failure,
ftruncate_failure,
fsync_failure,
/// locks
transactor_lock,
process_lock,
flush_lock,
flush_unlock,
process_unlock,
/// filesystem
missing_directory,
clear_directory,
rename_directory,
copy_directory,
/// store
not_coalesced,
missing_snapshot,
unloaded_file,
/// tables
create_table,
close_table,
prune_table,
backup_table,
restore_table,
verify_table,
/// validation/confirmation
tx_connected,
tx_disconnected,
block_valid,
block_confirmable,
block_unconfirmable,
unassociated,
unvalidated,
bypassed,
/// tx archive
tx_empty,
tx_tx_allocate,
tx_input_put,
tx_ins_put,
tx_output_put,
tx_outs_put,
tx_point_allocate,
tx_point_put,
tx_null_point_put,
tx_duplicate_put,
tx_tx_set,
tx_address_allocate,
tx_address_put,
tx_tx_commit,
/// header archive
header_put,
/// txs archive
txs_header,
txs_empty,
txs_height,
txs_confirm,
txs_txs_put,
/// services
not_found,
empty_block,
query_canceled,
invalid_argument,
missing_prevouts,
merkle_proof,
merkle_interval,
merkle_hashes
};
// No current need for error_code equivalence mapping.
DECLARE_ERROR_T_CODE_CATEGORY(error);
} // namespace error
} // namespace database
} // namespace libbitcoin
DECLARE_STD_ERROR_REGISTRATION(bc::database::error::error)
#endif