]> sourceware.org Git - systemtap.git/commitdiff
elaborate: Don't catch semantic_error in blocks
authorJosh Stone <jistone@redhat.com>
Tue, 10 Jun 2014 20:15:02 +0000 (13:15 -0700)
committerJosh Stone <jistone@redhat.com>
Tue, 10 Jun 2014 20:30:23 +0000 (13:30 -0700)
In typeresolution_info::visit_block(), we were catching and printing
semantic_errors, but this causes them to be repeated when type resolution
loops around again.  Instead let higher levels catch the error, where it
will end the iteration properly too.

This probably originated on the assumption that all probe and function code
is contained in a block statement, but with optimization that may not even
be true, so visit_block is really not the right place to catch errors.

elaborate.cxx

index 3634ab3993547a0513c539e49616149ec9039bb5..f86dd3b18f55ba8f2cbc1b4e4895a252dc64e059 100644 (file)
@@ -5039,15 +5039,8 @@ typeresolution_info::visit_block (block* e)
 {
   for (unsigned i=0; i<e->statements.size(); i++)
     {
-      try
-       {
-         t = pe_unknown;
-         e->statements[i]->visit (this);
-       }
-      catch (const semantic_error& e)
-       {
-         session.print_error (e);
-        }
+      t = pe_unknown;
+      e->statements[i]->visit (this);
     }
 }
 
This page took 0.035562 seconds and 5 git commands to generate.