This function is equivalent to lua_error( http://www.lua.org/manual/5.1/manual.html#lua_error ).
(lv LValue, level int)
| 1732 | |
| 1733 | // This function is equivalent to lua_error( http://www.lua.org/manual/5.1/manual.html#lua_error ). |
| 1734 | func (ls *LState) Error(lv LValue, level int) { |
| 1735 | if str, ok := lv.(LString); ok { |
| 1736 | ls.raiseError(level, string(str)) |
| 1737 | } else { |
| 1738 | if !ls.hasErrorFunc { |
| 1739 | ls.closeAllUpvalues() |
| 1740 | } |
| 1741 | ls.Push(lv) |
| 1742 | ls.Panic(ls) |
| 1743 | } |
| 1744 | } |
| 1745 | |
| 1746 | func (ls *LState) GetInfo(what string, dbg *Debug, fn LValue) (LValue, error) { |
| 1747 | if !strings.HasPrefix(what, ">") { |
nothing calls this directly
no test coverage detected