Value Except::call(Value self, Value member, short nargs, short nargnames, ushort* argnames, int each) { static Value As("As"); static Value Callstack("Callstack"); if (member == As) { argseach(nargs, nargnames, argnames, each); if (nargs != 1) except("usage: exception.As(string)"); return new Except(*this, ARG(0).gcstr()); } if (member == Callstack) { argseach(nargs, nargnames, argnames, each); NOARGS("exception.Callstack()"); return calls(); } else return SuString::call(self, member, nargs, nargnames, argnames, each); }
void noargs(short nargs, short nargnames, short* argnames, int each, const char* usage) { argseach(nargs, nargnames, argnames, each); if (nargs > nargnames) except("usage: " << usage); }