MCPcopy Index your code
hub / github.com/Shopify/go-lua / setErrorObject

Method setErrorObject

lua.go:1227–1237  ·  view source on GitHub ↗
(err error, oldTop int)

Source from the content-addressed store, hash-verified

1225}
1226
1227func (l *State) setErrorObject(err error, oldTop int) {
1228 switch err {
1229 case MemoryError:
1230 l.stack[oldTop] = l.global.memoryErrorMessage
1231 case ErrorError:
1232 l.stack[oldTop] = "error in error handling"
1233 default:
1234 l.stack[oldTop] = l.stack[l.top-1]
1235 }
1236 l.top = oldTop + 1
1237}
1238
1239func (l *State) protectedCall(f func(), oldTop, errorFunc int) error {
1240 callInfo, allowHook, nonYieldableCallCount, errorFunction := l.callInfo, l.allowHook, l.nonYieldableCallCount, l.errorFunction

Callers 1

protectedCallMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected