Test whether error occurs.

If error occurs, nothing would be happened.

However, no error exists, then exception would be thrown.

  • Parameters

    • title: string

      Title of exception because of no error exists

    Returns <T>(task: () => T) => T extends Promise<any> ? Promise<void> : void