Re: [ooc-compiler] Position of runtime error
Brought to you by:
mva
|
From: Marco O. <Mar...@we...> - 2005-05-14 17:14:21
|
Hello! I have been working too little with oo2c in recent months so I did not even remember "ooef" before Stewart Greenhill mentioned it. But after that I even remembered how I used and I tried it again. Just pipe the output to ooef. As you can see below ooef finds line number and column for each source file with error or warning. I have oo2c 2.1.4 installed, but it should work also with current version. bash> oo2c -M ExtractPopNeu |ooef src/SimpleDB/Collection.Mod:335:13: Warning: Variable may be undefined src/SimpleDB/Collection.Mod:335:13: Warning: Variable may be undefined src/ExtractPopNeu.Mod:76:25: Undeclared identifier src/ExtractPopNeu.Mod:80:25: Undeclared identifier src/ExtractPopNeu.Mod:89:25: Undeclared identifier src/ExtractPopNeu.Mod:92:25: Undeclared identifier Greetings, Marco ----- Original Message ----- From: "Stewart Greenhill" <sgr...@ii...> To: "August Karlstrom" <fus...@co...> Cc: <ooc...@li...> Sent: Friday, May 13, 2005 4:13 PM Subject: Re: [ooc-compiler] Position of runtime error > Hi August, > >> In runtime error messages, OOC outputs the position where the error >> occurred but no info on line (or column) number, for instance: >> >> ## >> ## Runtime error in module Test at pos 171 >> ## Dereference of NIL >> ## >> >> It's kind of hard to find the position in an editor that lacks Emacs' >> `goto-char' function and even for Emacs users it would be more >> convenient with a line (and a column) number. > [...] > > You can get this information using the 'ooef' utility. > > For example, > ooef src/Test.Mod 171 > > This gives you the source code context (the default behaviour, also > available via the --context switch). If you just want to know the line > and column you can do: > ooef --linecol src/Test.Mod 171 > > Hope this helps. > > Cheers, > Stewart > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Oracle Space Sweepstakes > Want to be the first software developer in space? > Enter now for the Oracle Space Sweepstakes! > http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click > _______________________________________________ > ooc-compiler mailing list > ooc...@li... > https://lists.sourceforge.net/lists/listinfo/ooc-compiler > |