Re: Some minor patches / E stack traces

Thomas Leonard <tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]> Fri, 02 Sep 2011 11:29:38 +0100
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On 2011-08-26 13:56, Kevin Reid wrote:
> On Aug 26, 2011, at 6:55, Thomas Leonard wrote:
>
>> On 2011-08-24 16:19, Kevin Reid wrote:
>>> On Aug 24, 2011, at 10:17, Thomas Leonard wrote:
>>>> http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/e14b3b40363499712b93680c09d0a730e6b48271
>>>>
>>>>
Give a shorter stack-trace from ELoader if the source file is missing
>>>
>>> Is this really worth the additional complexity of the code?
>>
>> Maybe. I think that part of the problem is that E stack traces are
>> hard to read. There's a lot of information (which is useful), but
>> it's hard to scan by eye.
>
> Mm. I've always found the leading symbols (@ . -) to be sufficient,
> but I agree colorizing is a reasonable improvement.
>
>> There's a patch on my "hacks" branch that colours the stack
>> traces:
>>
>> http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/f3da8f91a5a4ce9aebb8d484780a98fde389de05
>>
>>
>>
"." lines are highlighted in yellow and<file:...>  references are
>> highlighted in green.
>>
>> So, if you want to know *what* calls were made (including values),
>> just look at the yellow lines. If you want to to know the *types*
>> involved, look at the white text, and if you want to see source
>> locations, look for green text.
>
> This seems not-unreasonable (even assuming ANSI, as it is the de
> facto standard), except for the part where we don't have information
> about whether the output is *to* a terminal. I would rather see this
> as a syntax-highlighter stage optionally provided by
> elang.cmd.makeAnswerer (or a different object with the same
> interface), so that it's closer to the UI layers and not baked into
> exception objects' protocol.

Also, I don't think Windows supports ANSI yet.

Agree that highlighting should be separated from the exceptions, but
I'm not sure the answerer is the best place - many stack traces come 
from traceln(ex).


-- 
Dr Thomas Leonard
IT Innovation Centre
Gamma House, Enterprise Road,
Southampton SO16 7NS, UK


tel: +44 23 8059 8866

mailto:tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]
http://www.it-innovation.soton.ac.uk/