10. Recovery from errors

If Troff2page fails on your document, it will display a message giving its best guess on what the problem is and where it occurred in the source document. It also offers to take you there in your text editor so you can fix it immediately.

    filename:lineno: error description
    Type e to edit file filename at line lineno; x to quit
    ?

In the first line, or the error diagnostic line, filename is the particular source file (which need not be the main document file) and lineno is the estimated number of the line in that file that caused the error. (This is a popular error-reporting format and is exploited by text editors for helping the debugging process.)

In the second line, Troff2page offers to fire up a text editor with the cursor approximately close to the offending line.

If you type e at the ? prompt, Troff2page starts the editor specified in your EDITOR environment variable, or if that is not set, the editor named vi on your system. Troff2page calls the editor with two arguments: the first argument is + followed by the line number, and the second argument is the filename. (This argument style works for all vi and emacs clones and I suspect most modern editors take care to recognize it, so it isn’t as restrictive as it sounds.)