MCPcopy Create free account
hub / github.com/hoothin/UserScripts / tryCatch

Function tryCatch

Picviewer CE+/dist.user.js:4720–4730  ·  view source on GitHub ↗
(func, value)

Source from the content-addressed store, hash-verified

4718}
4719
4720function tryCatch(func, value) {
4721 var out = {};
4722 try {
4723 out.value = func(value);
4724 out.status = 'success';
4725 } catch (e) {
4726 out.status = 'error';
4727 out.value = e;
4728 }
4729 return out;
4730}
4731
4732Promise.resolve = resolve;
4733function resolve(value) {

Callers 2

dist.user.jsFile · 0.70
safelyResolveThenableFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected