(L *LState)
| 265 | } |
| 266 | |
| 267 | func threadRun(L *LState) { |
| 268 | if L.stack.IsEmpty() { |
| 269 | return |
| 270 | } |
| 271 | |
| 272 | defer func() { |
| 273 | if rcv := recover(); rcv != nil { |
| 274 | var lv LValue |
| 275 | if v, ok := rcv.(*ApiError); ok { |
| 276 | lv = v.Object |
| 277 | } else { |
| 278 | lv = LString(fmt.Sprint(rcv)) |
| 279 | } |
| 280 | if parent := L.Parent; parent != nil { |
| 281 | if L.wrapped { |
| 282 | L.Push(lv) |
| 283 | parent.Panic(L) |
| 284 | } else { |
| 285 | L.SetTop(0) |
| 286 | L.Push(lv) |
| 287 | switchToParentThread(L, 1, true, true) |
| 288 | } |
| 289 | } else { |
| 290 | panic(rcv) |
| 291 | } |
| 292 | } |
| 293 | }() |
| 294 | L.mainLoop(L, nil) |
| 295 | } |
| 296 | |
| 297 | type instFunc func(*LState, uint32, *callFrame) int |
| 298 |
no test coverage detected
searching dependent graphs…