1 2 3 4 5 6 7 8 9 10 11 12 | 1 1 1565 1565 3 4094 4094 | export function tryOrThrowError(target: Function): (x?: any) => any { function tryCatcher() { try { (<any> tryCatcher).target.apply(this, arguments); } catch (e) { throw e; } } (<any> tryCatcher).target = target; return tryCatcher; } |