Re: [ooc-compiler] Position of runtime error
Brought to you by:
mva
|
From: Stewart G. <sgr...@ii...> - 2005-05-16 01:15:36
|
On 15/05/2005, at 6:06 AM, August Karlstrom wrote: > Stewart Greenhill wrote: >> 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 > > Ok, thanks. I still don't understand why the runtime can't output line > and column as oo2c does by default. It could output this information, but that would require some changes to the way source position is encoded for run-time errors. Currently, oo2c uses the module descriptor and a single integer (ie. character position). I think a single integer would still be enough if (for example) 8 bits were used for column and 24 bits for row. The current solution works well for me. Usually, I want the line number and a little bit of source code context so I have to run an external program anyway. Cheers, Stewart |