]> sourceware.org Git - systemtap.git/commit - util.h
semantic_error: also print source of error
authorJonathan Lebon <jlebon@redhat.com>
Sat, 22 Mar 2014 04:50:53 +0000 (00:50 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Tue, 25 Mar 2014 14:34:06 +0000 (10:34 -0400)
commita22da505188bec49afca28e169698f36bc06bd0a
treef75f496d8625f2ce9083b1b9266d6ad8f077857b
parent1baa6f3593b25d98d26775c91955824b104d52f7
semantic_error: also print source of error

When printing semantic_errors at high verbosity (-vv), it can be useful
to also know where the error came from. That information is already made
available through the errsrc member of semantic_error (initially
implemented for dup-error elimination).

We also change the ERRSRC macro to use __FILE__ rather than __FUNCTION__
to be not only more informative, but more foolproof (e.g. two errors
thrown from identically named functions at identical lines in separate
files before would have been considered equivalent by the dup-error
elimination).

The final result is e.g. something like this:

semantic error: unresolved type : identifier 'ActiveOpens' at :22:8
   thrown from: elaborate.cxx:5239
        source: global ActiveOpens
                       ^
session.cxx
util.h
This page took 0.029504 seconds and 5 git commands to generate.