(e any)
| 157 | } |
| 158 | |
| 159 | func errorMessage(e any) string { |
| 160 | if re, ok := e.(err.Error); ok { |
| 161 | return fmt.Sprintf("E:%s:%d:%s", re.Name(), re.Code(), re.Error()) |
| 162 | } |
| 163 | if ee, ok := e.(error); ok { |
| 164 | return ee.Error() |
| 165 | } |
| 166 | return fmt.Sprintf("%v", e) |
| 167 | } |
| 168 | |
| 169 | func (v *VM) ThrowTypeError(message string) { |
| 170 | panic(v.o.MakeTypeError(message)) |
no test coverage detected