about summary refs log tree commit diff stats
path: root/html/020run.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-08-27 20:49:03 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-08-27 20:49:03 -0700
commitcd9bb850caeca88747a25436fc65c67c6d5cd89a (patch)
tree34ea30beb19b5fafe855b951b9468d2a9e915492 /html/020run.cc.html
parente947da75bd926da6d533fd73b352c16c8417b3f6 (diff)
downloadmu-cd9bb850caeca88747a25436fc65c67c6d5cd89a.tar.gz
3266
Diffstat (limited to 'html/020run.cc.html')
-rw-r--r--html/020run.cc.html9
1 files changed, 5 insertions, 4 deletions
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<span class="Delimiter">(</span><span class="Constant">&qu
 <span class="CommentedCode">//? START_TRACING_UNTIL_END_OF_SCOPE</span>
 <span class="Normal">if</span> <span class="Delimiter">(</span>argc &gt; <span class="Constant">1</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
   <span class="Comment">// skip argv[0]</span>
-  argv++<span class="Delimiter">;</span>
-  argc--<span class="Delimiter">;</span>
+  ++argv<span class="Delimiter">;</span>
+  --argc<span class="Delimiter">;</span>
   <span class="Comment">// ignore argv past '--'; that's commandline args for 'main'</span>
   <span class="Normal">while</span> <span class="Delimiter">(</span>argc &gt; <span class="Constant">0</span><span class="Delimiter">)</span> <span class="Delimiter">{</span>
     <span class="Normal">if</span> <span class="Delimiter">(</span>string<span class="Delimiter">(</span>*argv<span class="Delimiter">)</span> == <span class="Constant">&quot;--&quot;</span><span class="Delimiter">)</span> <span class="Identifier">break</span><span class="Delimiter">;</span>
@@ -200,6 +200,7 @@ load_file_or_directory<span class="Delimiter">(</span><span class="Constant">&qu
 transform_all<span class="Delimiter">();</span>
 <span class="CommentedCode">//? DUMP(&quot;&quot;);</span>
 <span class="CommentedCode">//? exit(0);</span>
+<span class="Normal">if</span> <span class="Delimiter">(</span>Trace_errors<span class="Delimiter">)</span> <span class="Identifier">return</span> <span class="Constant">1</span><span class="Delimiter">;</span>
 save_snapshots<span class="Delimiter">();</span>
 
 <span class="Comment">//: Step 3: if we aren't running tests, locate a recipe called 'main' and</span>
@@ -213,7 +214,6 @@ save_snapshots<span class="Delimiter">();</span>
   trace<span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">&quot;run&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;=== Starting to run&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
   assert<span class="Delimiter">(</span>Num_calls_to_transform_all == <span class="Constant">1</span><span class="Delimiter">);</span>
   run_main<span class="Delimiter">(</span>argc<span class="Delimiter">,</span> argv<span class="Delimiter">);</span>
-  <span class="Normal">if</span> <span class="Delimiter">(</span>Trace_main<span class="Delimiter">)</span> <span class="Normal">delete</span> Trace_stream<span class="Delimiter">,</span> Trace_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span>
   teardown<span class="Delimiter">();</span>
 <span class="Delimiter">}</span>
 <span class="Delimiter">:(code)</span>
@@ -255,6 +255,7 @@ save_snapshots<span class="Delimiter">();</span>
     fout &lt;&lt; Trace_stream<span class="Delimiter">-&gt;</span>readable_contents<span class="Delimiter">(</span><span class="Constant">&quot;&quot;</span><span class="Delimiter">);</span>
     fout<span class="Delimiter">.</span>close<span class="Delimiter">();</span>
   <span class="Delimiter">}</span>
+  <span class="Normal">if</span> <span class="Delimiter">(</span>Trace_stream<span class="Delimiter">)</span> <span class="Normal">delete</span> Trace_stream<span class="Delimiter">,</span> Trace_stream = <span class="Constant">NULL</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
 <span class="Delimiter">:(before &quot;End One-time Setup&quot;)</span>
 atexit<span class="Delimiter">(</span>cleanup_main<span class="Delimiter">);</span>
@@ -267,7 +268,7 @@ atexit<span class="Delimiter">(</span>cleanup_main<span class="Delimiter">);</sp
   <span class="Delimiter">}</span>
   ifstream fin<span class="Delimiter">(</span>filename<span class="Delimiter">.</span>c_str<span class="Delimiter">());</span>
   <span class="Normal">if</span> <span class="Delimiter">(</span>!fin<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-    raise &lt;&lt; <span class="Constant">&quot;no such file '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
+    cerr &lt;&lt; <span class="Constant">&quot;no such file '&quot;</span> &lt;&lt; filename &lt;&lt; <span class="Constant">&quot;'</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>  <span class="Comment">// don't raise, just warn. just in case it's just a name for a scenario to run.</span>
     <span class="Identifier">return</span><span class="Delimiter">;</span>
   <span class="Delimiter">}</span>
   trace<span class="Delimiter">(</span><span class="Constant">9990</span><span class="Delimiter">,</span> <span class="Constant">&quot;load&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;=== &quot;</span> &lt;&lt; filename &lt;&lt; end<span class="Delimiter">();</span>