use throwError for exit