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

Method errorMessage

debug.go:121–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119}
120
121func (l *State) errorMessage() {
122 if l.errorFunction != 0 { // is there an error handling function?
123 errorFunction := l.stack[l.errorFunction]
124 switch errorFunction.(type) {
125 case closure:
126 case *goFunction:
127 default:
128 l.throw(ErrorError)
129 }
130 l.stack[l.top] = l.stack[l.top-1] // move argument
131 l.stack[l.top-1] = errorFunction // push function
132 l.top++
133 l.call(l.top-2, 1, false)
134 }
135 l.throw(RuntimeError(CheckString(l, -1)))
136}
137
138// SetDebugHook sets the debugging hook function.
139//

Callers 2

runtimeErrorMethod · 0.95
ErrorMethod · 0.95

Calls 4

throwMethod · 0.95
callMethod · 0.95
RuntimeErrorTypeAlias · 0.85
CheckStringFunction · 0.85

Tested by

no test coverage detected