# Variable tryCatchInTransaction`Const`

tryCatchInTransaction: (f: Function, onError: Function) => Promise<any>

simulate the pg with rollback behavior

#### Type Declaration

- - (f: Function, onError: Function): Promise<any>

  - #### Parameters

    - f: Function

      code to run

    - onError: Function

      error callback

    #### Returns Promise<any>

    result of f

- Defined in db-common/dist/sqlite-commons.d.ts:106