Add error info
This commit is contained in:
@@ -10,7 +10,11 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now();
|
std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now();
|
||||||
camellya::State state;
|
camellya::State state;
|
||||||
state.do_file(argv[1]);
|
bool success = state.do_file(argv[1]);
|
||||||
|
if (!success) {
|
||||||
|
std::cerr << "Error: " << state.get_error() << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
std::chrono::high_resolution_clock::time_point end = std::chrono::high_resolution_clock::now();
|
std::chrono::high_resolution_clock::time_point end = std::chrono::high_resolution_clock::now();
|
||||||
std::chrono::duration<double> duration = end - start;
|
std::chrono::duration<double> duration = end - start;
|
||||||
std::cout << std::format("Execution completed in {} seconds. \n", duration.count()) << std::endl;
|
std::cout << std::format("Execution completed in {} seconds. \n", duration.count()) << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user