()
| 119 | } |
| 120 | |
| 121 | func (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 | // |
no test coverage detected