Skip to content

Commit b63d006

Browse files
committed
changed std::exit to std::abort that is more consistent with fast-fail policy
1 parent f7e3699 commit b63d006

17 files changed

Lines changed: 41 additions & 41 deletions

src/bitscan/bbscan_sparse.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,12 @@ namespace bitgraph {
491491
case DESTRUCTIVE_REVERSE:
492492
//scan_block(p.second);
493493
LOG_ERROR("destructive scan type currently not available in BBScanSp::init_scan...exiting");
494-
std::exit(EXIT_FAILURE);
494+
std::abort();
495495
//throw BitScanError("incorrect destructive scan type in BBScanSp::init_scan");
496496
break;
497497
default:
498498
LOG_ERROR("unknown scan type in BBScanSp::init_scan...exiting");
499-
std::exit(EXIT_FAILURE);
499+
std::abort();
500500
//throw BitScanError("unknown scan type in BBScanSp::init_scan");
501501
}
502502

src/bitscan/bbsentinel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ namespace bitgraph {
209209
break;
210210
default:
211211
cerr << "bad scan type" << endl;
212-
std::exit(EXIT_FAILURE);
212+
std::abort();
213213
}
214214
return 0;
215215
}

src/bitscan/bbset.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ BitSet::BitSet(std::size_t nPop, bool val) :
2929
catch (...) {
3030
LOG_ERROR("Error during construction - BitSet::BitSet");
3131
LOG_ERROR("exiting...");
32-
std::exit(EXIT_FAILURE);
32+
std::abort();
3333
}
3434

3535
//trim last bitblock to ZERO if val = TRUE
@@ -59,7 +59,7 @@ BitSet::BitSet(const vint& v):
5959
catch (...) {
6060
LOG_ERROR("Error during construction - BitSet::BitSet()");
6161
LOG_ERROR("exiting...");
62-
std::exit(EXIT_FAILURE);
62+
std::abort();
6363
}
6464
}
6565

@@ -85,7 +85,7 @@ BitSet::BitSet(std::size_t nPop, std::initializer_list<int> l):
8585
catch (...) {
8686
LOG_ERROR("Error during construction - BitSet::BitSet()");
8787
LOG_ERROR("exiting...");
88-
std::exit(EXIT_FAILURE);
88+
std::abort();
8989
}
9090
}
9191

@@ -98,7 +98,7 @@ void BitSet::init(std::size_t nPop) noexcept {
9898
catch (...) {
9999
LOG_ERROR("Error during allocation - BitSet::init");
100100
LOG_ERROR("exiting...");
101-
std::exit(EXIT_FAILURE);
101+
std::abort();
102102
}
103103

104104
}
@@ -124,7 +124,7 @@ void BitSet::init(std::size_t nPop, const vint& lv) noexcept {
124124
catch (...) {
125125
LOG_ERROR("Error during allocation - BitSet::init");
126126
LOG_ERROR("exiting...");
127-
std::exit(EXIT_FAILURE);
127+
std::abort();
128128
}
129129
}
130130

@@ -137,7 +137,7 @@ void BitSet::reset(std::size_t nPop) noexcept {
137137
catch (...) {
138138
LOG_ERROR("Error during allocation - BitSet::reset");
139139
LOG_ERROR("exiting...");
140-
std::exit(EXIT_FAILURE);
140+
std::abort();
141141
}
142142

143143
}
@@ -162,7 +162,7 @@ void BitSet::reset(std::size_t nPop, const vint& lv) noexcept {
162162
catch (...) {
163163
LOG_ERROR("Error during allocation - BitSet::reset");
164164
LOG_ERROR("exiting...");
165-
std::exit(EXIT_FAILURE);
165+
std::abort();
166166
}
167167
}
168168

src/bitscan/bbset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2081,7 +2081,7 @@ bitgraph::BitSet::BitSet(std::size_t nPop, const ColT& lv) :
20812081
catch (...) {
20822082
LOG_ERROR("Error during construction - BitSet::BitSet()");
20832083
LOG_ERROR("exiting...");
2084-
std::exit(EXIT_FAILURE);
2084+
std::abort();
20852085
}
20862086
}
20872087

src/bitscan/bbset_sparse.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ BitSetSp::BitSetSp(std::size_t nPop, const vint& lv):
6363
catch (...) {
6464
LOG_ERROR("Error during construction - BitSet::BitSetSp()");
6565
LOG_ERROR("exiting...");
66-
std::exit(EXIT_FAILURE);
66+
std::abort();
6767
}
6868
}
6969

@@ -90,7 +90,7 @@ BitSetSp::BitSetSp(std::size_t nPop, std::initializer_list<int> lv) :
9090
catch (...) {
9191
LOG_ERROR("Error during construction - BitSet::BitSetSp()");
9292
LOG_ERROR("exiting...");
93-
std::exit(EXIT_FAILURE);
93+
std::abort();
9494
}
9595
}
9696

@@ -105,7 +105,7 @@ void BitSetSp::reset(std::size_t nPop, bool is_popsize) noexcept
105105
catch (...) {
106106
LOG_ERROR("Error during reset - BitSet::reset");
107107
LOG_ERROR("exiting...");
108-
std::exit(EXIT_FAILURE);
108+
std::abort();
109109
}
110110
}
111111

@@ -133,7 +133,7 @@ void BitSetSp::reset(std::size_t nPop, const vint& lv) noexcept
133133
catch (...) {
134134
LOG_ERROR("Error during reset - BitSet::reset");
135135
LOG_ERROR("exiting...");
136-
std::exit(EXIT_FAILURE);
136+
std::abort();
137137
}
138138
}
139139

@@ -146,7 +146,7 @@ void BitSetSp::init (std::size_t size, bool is_popsize) noexcept {
146146
catch (...) {
147147
LOG_ERROR("Error during initialization - BitSet::init");
148148
LOG_ERROR("exiting...");
149-
std::exit(EXIT_FAILURE);
149+
std::abort();
150150
}
151151
}
152152

src/bitscan/bbutils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ namespace bitgraph {
307307
catch (std::exception& e) {
308308
LOG_ERROR("%s", e.what());
309309
LOG_ERROR("BitSetArray::BitSetArray()");
310-
std::exit(EXIT_FAILURE);
310+
std::abort();
311311
}
312312
}
313313

@@ -477,7 +477,7 @@ namespace bitgraph {
477477
catch (std::exception& e) {
478478
LOG_ERROR("%s", e.what());
479479
LOG_ERROR("BitSetStack<BitSetT>::-reset()");
480-
std::exit(EXIT_FAILURE);
480+
std::abort();
481481
}
482482

483483
}; //end struct

src/graph/algorithms/decode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace bitgraph {
3838
LOGG_ERROR("Out of Range error: ", oor.what());
3939
LOGG_ERROR("DecodeVertex: operator() - vertex : ", v);
4040
LOGG_ERROR("exiting...");
41-
std::exit(EXIT_FAILURE);
41+
std::abort();
4242
}
4343
}
4444
return v;

src/graph/algorithms/graph_fast_sort.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ namespace bitgraph {
494494
if (node_active_state_.init_scan(BBObject::NON_DESTRUCTIVE) != -1) {
495495
LOG_ERROR("init scan failed - GraphFastRootSort<Graph_t>::sort_degen_non_decreasing_deg_B");
496496
LOG_ERROR("exting");
497-
std::exit(EXIT_FAILURE);
497+
std::abort();
498498
}
499499

500500
while ((w = node_active_state_.next_bit()) != BBObject::noBit) {

src/graph/algorithms/graph_gen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ namespace bitgraph{
346346
f.open(o.str().c_str());
347347
if (!f) {
348348
LOGG_ERROR("error in file name: ", o.str(), "- RandomGen<Graph_t>::create_graph_benchmark");
349-
std::exit(EXIT_FAILURE);
349+
std::abort();
350350
}
351351
g.write_dimacs(f);
352352
f.close();

src/graph/algorithms/graph_map.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ namespace bitgraph{
267267
/*if (!is_consistent()) {
268268
LOG_ERROR("L2R and R2L are inconsistent orderings - GraphMap::build_mapping (2 ord...)");
269269
LOG_ERROR("exiting...");
270-
std::exit(EXIT_FAILURE);
270+
std::abort();
271271
}*/
272272

273273
//I/O
@@ -296,7 +296,7 @@ namespace bitgraph{
296296
/*if (!is_consistent()) {
297297
LOG_ERROR("L2R and R2L are inconsistent orderings - GraphMap::build_mapping(single ord...)");
298298
LOG_ERROR("exiting...");
299-
std::exit(EXIT_FAILURE);
299+
std::abort();
300300
}*/
301301

302302
//return 0;

0 commit comments

Comments
 (0)