[Top][All Lists]

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

Customized error reports

From: Joris van der Hoeven
Subject: Customized error reports
Date: Thu, 27 Feb 2003 13:17:57 +0100 (MET)


Is it possible to let customized error reports display
the file name and line number of an object of my choice,
and not the expression which raised the error.

For instance, I have the following piece of code

  (define (menu-format-error where which)
    (throw 'error 'texmacs-error "Bad menu format in: %S" (list which)))

On an error in a menu definition, I get the following report:

  menu-define.scm:58:3: In procedure throw in expression (throw (quote error) 
(quote texmacs-error) ...):
  menu-define.scm:58:3: Bad menu format in: oops

What I would like to have, is the not the file and line number
where the throw is done, but the file and the line number of
the erroneous expression. In other words, the error report should
have been something like

  test-menu.scm:111:5: In procedure throw in expression (oops "blahblah")
  test-menu.scm:111:5: Bad menu format in: oops

So how can I do that?

Thanks, Joris

Joris van der Hoeven <address@hidden> GNU TeXmacs scientific text editor personal homepage

reply via email to

[Prev in Thread] Current Thread [Next in Thread]