From cd9bb850caeca88747a25436fc65c67c6d5cd89a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 27 Aug 2016 20:49:03 -0700 Subject: 3266 --- html/020run.cc.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'html/020run.cc.html') diff --git a/html/020run.cc.html b/html/020run.cc.html index 61706723..31a8e9ad 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -186,8 +186,8 @@ load_file_or_directory(&qu //? START_TRACING_UNTIL_END_OF_SCOPE if (argc > 1) { // skip argv[0] - argv++; - argc--; + ++argv; + --argc; // ignore argv past '--'; that's commandline args for 'main' while (argc > 0) { if (string(*argv) == "--") break; @@ -200,6 +200,7 @@ load_file_or_directory(&qu transform_all(); //? DUMP(""); //? exit(0); +if (Trace_errors) return 1; save_snapshots(); //: Step 3: if we aren't running tests, locate a recipe called 'main' and @@ -213,7 +214,6 @@ save_snapshots(); trace(9990, "run") << "=== Starting to run" << end(); assert(Num_calls_to_transform_all == 1); run_main(argc, argv); - if (Trace_main) delete Trace_stream, Trace_stream = NULL; teardown(); } :(code) @@ -255,6 +255,7 @@ save_snapshots(); fout << Trace_stream->readable_contents(""); fout.close(); } + if (Trace_stream) delete Trace_stream, Trace_stream = NULL; } :(before "End One-time Setup") atexit(cleanup_main); @@ -267,7 +268,7 @@ atexit(cleanup_main);} ifstream fin(filename.c_str()); if (!fin) { - raise << "no such file '" << filename << "'\n" << end(); + cerr << "no such file '" << filename << "'\n" << end(); // don't raise, just warn. just in case it's just a name for a scenario to run. return; } trace(9990, "load") << "=== " << filename << end(); -- cgit 1.4.1-2-gfad0