[ROOT] CINT error message syntax

From: Christoph Bugel (chris@tti-telecom.com)
Date: Sun Nov 11 2001 - 14:04:33 MET


(disclaimer: this is about pure cint, not about root)

Hello,

I found a problem with the error messages produced by cint. The problem
is that when I write: "static X x(1);" somewhere, for example inside an
interpreted main() function, and when there is no such class 'X', I get
the following error message:


Possible candidates are...
filename       line:size busy function type and name  
Error: Function Xx(1) is not defined in current scope  FILE:bug.cc LINE:22
Possible candidates are...
filename       line:size busy function type and name  
!!! return from main() function


Normally, for example when I write "X x(1);", the error message starts
with "Error: ...", but in this particular case the error message looks
as if it is actually 2 messages, and that the first half of the message
has disappeared, and now it starts with "Possible candidates".

For me this not just a cosmetical problem, because I use cint as a
library, and errors don't go to the stdout: instead I use
G__set_errmsgcallback(), to be notified whenever an error message is
printed. When I am notified I throw an exception with the reported
error. The errors are reported line by line, so in practice I can only
report the first error line. Normally the first error line is the most
informative, but in this case it is not informative, and my users are
complaining: "what is this 'possible candidates' error??"

Any ideas about how to fix this would be appreciated!
(I was just thinking -- if it is hard to fix, maybe I could check if
the error line starts with "Error:" and only throw an exception if it
does. This is not very elegant, though :)
BTW, I used cint version 5.15.10

Thanks,
Christoph



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:07 MET