diff options
author | Josh Stone <jistone@redhat.com> | 2010-04-07 16:41:41 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-04-07 16:46:57 -0700 |
commit | 1af1e62d9f67237277dd771a0cb78fa6b069742d (patch) | |
tree | 7a168a6caf1649dfe2ea470d43972c65619a06ad /staptree.h | |
parent | ea1e477a78969d44aeea51cfc3cbd2e8ed96cfe4 (diff) | |
download | systemtap-steved-1af1e62d9f67237277dd771a0cb78fa6b069742d.tar.gz systemtap-steved-1af1e62d9f67237277dd771a0cb78fa6b069742d.tar.xz systemtap-steved-1af1e62d9f67237277dd771a0cb78fa6b069742d.zip |
Clean up and clarify semantic_error chaining
I consolidated the copy-construction that every target_symbol::chain
caller was doing. I also removed the comments that target_symbol errors
might be chained due to function wildcards, because it's not true --
each derived instance gets a deep_copy of the probe body. However,
@cast can still chain since it may try multiple modules to resolve the
casting dereference.
Diffstat (limited to 'staptree.h')
-rw-r--r-- | staptree.h | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -33,9 +33,7 @@ struct semantic_error: public std::runtime_error semantic_error *chain; ~semantic_error () throw () {} - semantic_error (const std::string& msg): - runtime_error (msg), tok1 (0), tok2 (0), chain (0) {} - semantic_error (const std::string& msg, const token* t1): + semantic_error (const std::string& msg, const token* t1=0): runtime_error (msg), tok1 (t1), tok2 (0), chain (0) {} semantic_error (const std::string& msg, const token* t1, const std::string& m2, const token* t2): @@ -258,7 +256,7 @@ struct target_symbol: public symbol std::string probe_context_var; // NB: this being set implies that target_symbol is *resolved* semantic_error* saved_conversion_error; // hand-made linked list target_symbol(): addressof(false), saved_conversion_error (0) {} - void chain (semantic_error* e); + void chain (const semantic_error& er); void print (std::ostream& o) const; void visit (visitor* u); void visit_components (visitor* u); |