Class InternalErrorsHandler


  • public class InternalErrorsHandler
    extends Object
    Responsible for monitoring internal errors. Integrates to the SystemProblemNotification component.

    Note: currently only the errors of the last problematic build are stored. E.g. if there is a sequence of failing builds:

    • build #1 fails with checkout error
    • build #2 fails with apply patch error
    • build #3 fails with artifact dependency error
    only the problem of the build #3 is considered actual.

    The problems are not persisted anywhere, but restored from build history on startup.

    Thread safe.

    Internal errors are tracked per branch since 7.1.1 (see TW-22634).

    Since:
    6.0
    Author:
    Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
    • Constructor Detail

      • InternalErrorsHandler

        public InternalErrorsHandler()
    • Method Detail

      • setProjectManager

        public void setProjectManager​(@NotNull
                                      ProjectManager projectManager)
      • setBuildsManager

        public void setBuildsManager​(@NotNull
                                     BuildsManager buildsManager)
      • setExecutorServices

        public void setExecutorServices​(@NotNull
                                        ExecutorServices executors)
      • init

        public void init()
      • raiseProblemForBuild

        public void raiseProblemForBuild​(@NotNull
                                         SBuild build,
                                         @Nullable
                                         ErrorData errorData)
        Raises the problem of a build.
        Parameters:
        build - the build in which an internal error occurred
      • raiseProblemForBuild

        public void raiseProblemForBuild​(@NotNull
                                         SBuild build,
                                         @Nullable
                                         String description,
                                         @Nullable
                                         String cause)
        Raises the problem of a build.
        Parameters:
        build - the build in which an internal error occurred
        errorData -
      • clearPotentialProblems

        public void clearPotentialProblems​(@NotNull
                                           SBuild build)
        Removes "internal error" problems that were potentially raised for a build configuration. Problems reported by this build (if any) are sustained.
        Parameters:
        build - the build that successfully passed preparation stage
      • getBuildFromProblem

        @Nullable
        public SBuild getBuildFromProblem​(@NotNull
                                          SystemProblem problem)