Lush/Debugging

Parse errorsEdit

Parse errors can be particularly hard to locate and fix. A typical parse error looks like the following:

 ? (libload "main")
 *** read : end of file
 Debug toplevel [y/N] ?

You can narrow the error down to the file that was misparsed by answering 'y' and printing out fname:

 ? (libload "main")
 *** read : end of file
 Debug toplevel [y/N] ?y
 ** in:  (load fname)
 ** from: (prog1 (load fname) (let ((mtime (alist-get (quote m ...
 ** from: (when (libload.check rname (htable)) (when (not (lus ...
 ** from: (let* ((fname (libload.search s)) (rname (or (relati ...
 ** from: (libload "state-cost")
 ** from: (load fname)
 [Debug]
 ? fname
 = "/home/mkg/projects/physlearn/state-cost.lsh"