MCPcopy Index your code
hub / github.com/ionic-team/ionic-framework / safeCall

Function safeCall

core/src/utils/overlays.ts:836–848  ·  view source on GitHub ↗
(handler: any, arg?: any)

Source from the content-addressed store, hash-verified

834 * tracking software can log it.
835 */
836export const safeCall = (handler: any, arg?: any) => {
837 if (typeof handler === 'function') {
838 const jmp = config.get('_zoneGate', defaultGate);
839 return jmp(() => {
840 try {
841 return handler(arg);
842 } catch (e) {
843 throw e;
844 }
845 });
846 }
847 return undefined;
848};
849
850export const BACKDROP = 'backdrop';
851export const GESTURE = 'gesture';

Callers 8

rbClickMethod · 0.90
cbClickMethod · 0.90
callButtonHandlerMethod · 0.90
callOptionHandlerMethod · 0.90
callButtonHandlerMethod · 0.90
callOptionHandlerMethod · 0.90
callButtonHandlerMethod · 0.90
callButtonHandlerMethod · 0.90

Calls 2

handlerFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected