Re: Confusing error message for nil-indexed C arrays

  • From: Mike Pall <mike-1208@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 5 Aug 2012 17:32:41 +0200

Markus Walther wrote:
> On Fri, Aug 3, 2012 at 11:31 PM, Mike Pall <mike-1208@xxxxxxxxxx> wrote:
> > Well, the error is generic. What if you index an array with e.g.
> > 'true' or a table as a key? Would it help to use
> >
> >   '%s' cannot be indexed with '%s'
> > e.g.
> >   'int [?]' cannot be indexed with 'nil'
> >
> > instead?
> 
> Yes, I think that would be helpful - assuming the 2nd '%s' is
> instantiated with the type or tostring  of the offending index value.

Fixed in git HEAD.

--Mike

Other related posts: