Class InvalidRepositoryException

    • Constructor Detail

      • InvalidRepositoryException

        public InvalidRepositoryException​(String message)
      • InvalidRepositoryException

        public InvalidRepositoryException​(String message,
                                          Throwable cause)
      • InvalidRepositoryException

        public InvalidRepositoryException​(String message,
                                          String stdout,
                                          String stderr)
      • InvalidRepositoryException

        public InvalidRepositoryException​(String message,
                                          Throwable cause,
                                          String stdout,
                                          String stderr,
                                          long repositoryId)
    • Method Detail

      • handleInvalidRepositoryIfAppropriate

        public static boolean handleInvalidRepositoryIfAppropriate​(@Nullable
                                                                   @Nullable PlanKey planKey,
                                                                   Throwable e,
                                                                   ErrorCollection errorCollection,
                                                                   com.atlassian.event.api.EventPublisher eventPublisher,
                                                                   @Nullable
                                                                   @Nullable ErrorHandler errorHandler)
        Handles an InvalidRepositoryException if appropriate, based on the exception type and the SystemProperty.PLAN_DISABLE_ON_REPOSITORY_EXCEPTION setting If the system property is true, the plan is disabled and an event published. If false, the exception is ignored, and a warning is logged, leaving the plan enabled.
        Parameters:
        planKey - the key of the plan being checked
        e - the exception to handle
        errorCollection - a collection for error messages
        eventPublisher - publishes suspension events
        errorHandler - optional handler for recording errors
        Returns:
        true if the exception was handled (plan suspended), false otherwise