+inline-end
(level int, format string, args ...interface{})
| 633 | } // +inline-end |
| 634 | |
| 635 | func (ls *LState) raiseError(level int, format string, args ...interface{}) { |
| 636 | if !ls.hasErrorFunc { |
| 637 | ls.closeAllUpvalues() |
| 638 | } |
| 639 | message := format |
| 640 | if len(args) > 0 { |
| 641 | message = fmt.Sprintf(format, args...) |
| 642 | } |
| 643 | if level > 0 { |
| 644 | message = fmt.Sprintf("%v %v", ls.where(level-1, true), message) |
| 645 | } |
| 646 | if ls.reg.IsFull() { |
| 647 | // if the registry is full then it won't be possible to push a value, in this case, force a larger size |
| 648 | ls.reg.forceResize(ls.reg.Top() + 1) |
| 649 | } |
| 650 | ls.reg.Push(LString(message)) |
| 651 | ls.Panic(ls) |
| 652 | } |
| 653 | |
| 654 | func (ls *LState) findLocal(frame *callFrame, no int) string { |
| 655 | fn := frame.Fn |
no test coverage detected