liutanyu / mcl

Automatically exported from code.google.com/p/mcl
Other
0 stars 0 forks source link

svref error signal #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A nit (and not to do with recent ports/upgrades to MCL, but on a todo list
for anyone hacking in these parts):

Attempting to access outside the bounds of a vector with svref gives a not
very helpful error report.

(svref (vector 1) 1)
> Error: Too few arguments.
> While executing: CCL::%ERR-DISP
...

OK the debugger backtrace probably shows how things went awry, but I think
the initial error report is suboptimal (could be more user friendly).
(there ARE enough arguments in what I am looking at!)

Original issue reported on code.google.com by p2.edoc@gmail.com on 8 Nov 2009 at 3:08

GoogleCodeExporter commented 8 years ago
It seems like it is %err-disp that is wrongly called with no arguments when 
attempting to signal another error: 

? (advise ccl::%err-disp
        (if ccl::arglist
          (:do-it)
          (break "%err-disp is called without arguments"))
        :when :around :name 'test-%err-disp)

? (svref (vector 1) 1)
> Break in process Listener 1: %err-disp is called without arguments
> While executing: (ADVISED '%ERR-DISP)

Original comment by terje.norderhaug on 9 Nov 2009 at 6:12