(rest, action, defaultCompletion)
| 495 | cont`; |
| 496 | |
| 497 | function throwOrReturn(rest, action, defaultCompletion) { |
| 498 | if (focusedFrame !== topFrame) { |
| 499 | print(`To ${action}, you must select the newest frame (use 'frame 0')`); |
| 500 | return; |
| 501 | } |
| 502 | if (rest === '') |
| 503 | return [defaultCompletion]; |
| 504 | |
| 505 | const result = evalInFrame(rest); |
| 506 | if (result) |
| 507 | return [{[action]: result.value}]; |
| 508 | } |
| 509 | |
| 510 | function throwCommand(rest) { |
| 511 | return throwOrReturn(rest, 'throw', {throw: lastExc}); |
no test coverage detected