Branch: Tag:

2013-06-10

2013-06-10 13:55:36 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Errors: Improved emulation of arrays in object errors.

Implement _sizeof(), _indices() and _values() in the generic error class.

Fixes "Index 2 is out of range 0..1." from describe_backtrace().

673:    }   }    + static void f_error__sizeof(INT32 args) + { +  pop_n_elems(args); +  push_int(2); + } +  + static void f_error__indices(INT32 args) + { +  pop_n_elems(args); +  push_int(0); +  push_int(1); +  f_aggregate(2); + } +  + static void f_error__values(INT32 args) + { +  pop_n_elems(args); +  apply_current(generic_err_message_fun, 0); +  apply_current(generic_err_backtrace_fun, 0); +  f_aggregate(2); + } +    /*! @decl string describe()    *!    *! Return a readable error report that includes the backtrace.