This function is equivalent to lua_error( http://www.lua.org/manual/5.1/manual.html#lua_error ).
(lv LValue, level int)
| 1519 | |
| 1520 | // This function is equivalent to lua_error( http://www.lua.org/manual/5.1/manual.html#lua_error ). |
| 1521 | func (ls *LState) Error(lv LValue, level int) { |
| 1522 | if str, ok := lv.(LString); ok { |
| 1523 | ls.raiseError(level, string(str)) |
| 1524 | } else { |
| 1525 | if !ls.hasErrorFunc { |
| 1526 | ls.closeAllUpvalues() |
| 1527 | } |
| 1528 | ls.Push(lv) |
| 1529 | ls.Panic(ls) |
| 1530 | } |
| 1531 | } |
| 1532 | |
| 1533 | func (ls *LState) GetInfo(what string, dbg *Debug, fn LValue) (LValue, error) { |
| 1534 | if !strings.HasPrefix(what, ">") { |
nothing calls this directly
no test coverage detected