code: func ArgumentError(l *State, argCount int, extraMessage string) {
  	f, ok := Stack(l, 0)
  	if !ok { // no stack frame?
  		Errorf(l, "bad argument #%d (%s)", argCount, extraMessage)
  		return
  	}
  	d, _ := Info(l, "n", f)
  	if d.NameKind == "method" {
  		argCount--         // do not count 'self'
  		if argCount == 0 { // error is in the self argument itself?
  			Errorf(l, "calling '%s' on bad self (%s)", d.Name, extraMessage)
  			return
  		}
  	}
  	if d.Name == "" {
  		if pushGlobalFunctionName(l, f) {
  			d.Name, _ = l.ToString(-1)
  		} else {
  			d.Name = "?"
  		}
  	}
  	Errorf(l, "bad argument #%d to '%s' (%s)", argCount, d.Name, extraMessage)
  }
docs: // ArgumentError raises an error with a standard message that includes extraMessage as a comment.
  //
  // This function never returns. It is an idiom to use it in Go functions as
  //  lua.ArgumentError(l, args, "message")
  //  panic("unreachable")