MCPcopy Create free account
hub / github.com/GNOME/gjs / throwOrReturn

Function throwOrReturn

modules/script/_bootstrap/debugger.js:497–508  ·  view source on GitHub ↗
(rest, action, defaultCompletion)

Source from the content-addressed store, hash-verified

495 cont`;
496
497function 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
510function throwCommand(rest) {
511 return throwOrReturn(rest, 'throw', {throw: lastExc});

Callers 2

throwCommandFunction · 0.85
returnCommandFunction · 0.85

Calls 1

evalInFrameFunction · 0.85

Tested by

no test coverage detected