[ROOT] RE:CINT error message syntax

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Mon Nov 12 2001 - 22:43:39 MET


Hello Christioph,

I am sorry for inconvenience. It is a good idea to throw
an exception only for "Error: ..." and "Warning: ...". 
To be precise, the error call back can be called multiple
times in one error. It also displays auxiliary information
like "Possible candidates...". 

As you say, this is not very elegant, however realistic
way to workaround the problem.

Thank you
Masaharu Goto



>Date: Sun, 11 Nov 2001 15:04:33 +0200
>From: Christoph Bugel <chris@tti-telecom.com>
>To: rootdev@pcroot.cern.ch, roottalk@pcroot.cern.ch
>Subject: CINT error message syntax
>
>(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:08 MET