lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


"John Hind" <john.hind@zen.co.uk> writes:

> Well quite ...
>
> Submit "= i + 1" to luaL_loadstring and you get this error message:
>
> "e + 1:1: unexpected symbol near '='"
>
> Confusing or what?

There'll always be exceptional cases.

I've written a package in TeX that passes information to the controlling
system by using error messages, since that gives source location
information not readily available by other means.

Now for this application, TeX has the unfortunate side effect of
generating additional error context in the form

macro->current context start
                            current context end

People were asking questions about those error messages all the time.
Finally I made sure that the macro triggering the message was named "<"
and its context start consisted of macros with the print form <->, and
no context end.  So the error message contexts looked like
<-><->

which stopped people thinking about them because they looked like some
arbitrary ornamentation.

No matter how you format the error messages, you will find cases where
the formatting and the error context make a strange combination.

-- 
David Kastrup