From a mail to the tex-live list:

Hi,

as default, LaTeX does not trace the error, it just displays the line
number but not the file and does not show what triggered the error.
Add the following to the beginning of your main file:

\errorcontextlines=999

It will then show the complete trace of the expansion leading to the
undefined control sequence.

Zdeněk Wagner

 - - -

and From David Carlisle: to identify the lien number when many, or nested,
input files are involved, use --file-line-error command line option
(available for all texlive engines).

