File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ void Generator::GenerateTask() {
52
52
auto run_command = [this ](const std::string &command) {
53
53
try {
54
54
bool success = env::Command::Execute (command);
55
- env::assert_throw (success, fmt::format (" {} failed" , command));
55
+ env::assert_fatal (success, fmt::format (" {} failed" , command));
56
56
} catch (...) {
57
57
std::lock_guard<std::mutex> guard (task_state_mutex_);
58
58
task_state_ = env::TaskState::FAILURE;
@@ -104,7 +104,7 @@ void Generator::GenerateTask() {
104
104
if (dirty_) {
105
105
try {
106
106
serialization_.UpdateStore (user_);
107
- env::assert_throw (serialization_.StoreToFile (),
107
+ env::assert_fatal (serialization_.StoreToFile (),
108
108
fmt::format (" Store failed for {}" , name_));
109
109
} catch (...) {
110
110
task_state_ = env::TaskState::FAILURE;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ void AggregateToFile(const fs::path &filename,
54
54
});
55
55
bool success = buildcc::env::save_file (
56
56
buildcc::path_as_string (filename).c_str (), constructed_output, false );
57
- buildcc::env::assert_throw (success, " Could not save pch file" );
57
+ buildcc::env::assert_fatal (success, " Could not save pch file" );
58
58
}
59
59
60
60
} // namespace
@@ -108,10 +108,10 @@ void CompilePch::BuildCompile() {
108
108
const std::string p = fmt::format (" {}" , source_path_);
109
109
const bool save =
110
110
env::save_file (p.c_str (), {" //Generated by BuildCC" }, false );
111
- env::assert_throw (save, fmt::format (" Could not save {}" , p));
111
+ env::assert_fatal (save, fmt::format (" Could not save {}" , p));
112
112
}
113
113
bool success = env::Command::Execute (command_);
114
- env::assert_throw (success, " Failed to compile pch" );
114
+ env::assert_fatal (success, " Failed to compile pch" );
115
115
}
116
116
}
117
117
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ void LinkTarget::BuildLink() {
98
98
99
99
if (target_.dirty_ ) {
100
100
bool success = env::Command::Execute (command_);
101
- env::assert_throw (success, " Failed to link target" );
101
+ env::assert_fatal (success, " Failed to link target" );
102
102
target_.serialization_ .UpdateTargetCompiled ();
103
103
}
104
104
}
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ void CompileObject::Task() {
124
124
try {
125
125
bool success = env::Command::Execute (
126
126
GetObjectData (s.GetPathname ()).command );
127
- env::assert_throw (success, " Could not compile source" );
127
+ env::assert_fatal (success, " Could not compile source" );
128
128
target_.serialization_ .AddSource (s);
129
129
} catch (...) {
130
130
target_.SetTaskStateFailure ();
@@ -170,7 +170,7 @@ void Target::EndTask() {
170
170
if (dirty_) {
171
171
try {
172
172
serialization_.UpdateStore (user_);
173
- env::assert_throw (serialization_.StoreToFile (),
173
+ env::assert_fatal (serialization_.StoreToFile (),
174
174
fmt::format (" Store failed for {}" , GetName ()));
175
175
state_.BuildCompleted ();
176
176
} catch (...) {
Original file line number Diff line number Diff line change 25
25
#include < unordered_set>
26
26
27
27
// Env
28
- #include " env/assert_throw .h"
28
+ #include " env/assert_fatal .h"
29
29
30
30
// Third party
31
31
#include " fmt/format.h"
@@ -51,7 +51,7 @@ class Path {
51
51
std::filesystem::last_write_time (pathname, errcode)
52
52
.time_since_epoch ()
53
53
.count ();
54
- env::assert_throw (errcode.value () == 0 ,
54
+ env::assert_fatal (errcode.value () == 0 ,
55
55
fmt::format (" {} not found" , pathname));
56
56
57
57
return Path (pathname, last_write_timestamp);
You can’t perform that action at this time.
0 commit comments