+inline-end
(level int, format string, args ...interface{})
| 733 | } // +inline-end |
| 734 | |
| 735 | func (ls *LState) raiseError(level int, format string, args ...interface{}) { |
| 736 | if !ls.hasErrorFunc { |
| 737 | ls.closeAllUpvalues() |
| 738 | } |
| 739 | message := format |
| 740 | if len(args) > 0 { |
| 741 | message = fmt.Sprintf(format, args...) |
| 742 | } |
| 743 | if level > 0 { |
| 744 | message = fmt.Sprintf("%v %v", ls.where(level-1, true), message) |
| 745 | } |
| 746 | if ls.reg.IsFull() { |
| 747 | // if the registry is full then it won't be possible to push a value, in this case, force a larger size |
| 748 | ls.reg.forceResize(ls.reg.Top() + 1) |
| 749 | } |
| 750 | ls.reg.Push(LString(message)) |
| 751 | ls.Panic(ls) |
| 752 | } |
| 753 | |
| 754 | func (ls *LState) findLocal(frame *callFrame, no int) string { |
| 755 | fn := frame.Fn |
no test coverage detected