Class SystemProblem


  • public class SystemProblem
    extends Object
    Represents a problem related to the functioning of TeamCity itself or any of its components, called a system problem. Not to be confused with BuildProblem which represents a problem relates to a particular build.
    A system problem is usually connected to one of TeamCity entities (a build type, a project, a VCS root, etc.), which helps to aggregate reported problems around related entities and control access to them.

    A system property consists of the following properties:

    • description - a textual human readable description of the problem
    • cause (optional) - a Throwable instance associated with the problem
    • cause details (optional) - the same, but for the cases when the cause is not expressed as a Throwable instance
    • problem type (optional) - an arbitrary string code. Used to identify a type of the problem for further handling.
    • problem source (optional) - an arbitrary string. Used to identify the source of the problem for further handling.

    Problem type and problem source are meaningful only in the context of handling a problem. For example a problem with VCS connection has problem type "VCS_CONFIGURATION", and when being reported it was connected with a particular VCS Root. Having encountered a VCS_CONFIGURATION problem the web UI may offer to the user the link to the configuration page for the related VCS Root.
    The problem source property may additionally help in problem handling. For example, the problems with triggers are reported for Build Types. To provide the user with the web link to the source of the problem it's not enough to know the particular Build Type and problem type. In this case we can use a unique build trigger signature as the problem source. Combining three things together -- a system entity (a build type in our example), a problem type (some predefined string similar to "VCS_CONFIGURATION"), and the problem source (a build trigger signature) we can provide a full link to the page where we can fix the trigger configuration.
    Cause (or cause details) are displayed in UI, when the user clicks on a "show details" link. Most commonly it is a stacktrace.

    Since:
    5.0
    See Also:
    BuildProblem, SystemProblemNotification, SystemProblemList, SystemProblemEntry
    • Constructor Detail

      • SystemProblem

        public SystemProblem​(@NotNull
                             String description,
                             @Nullable
                             Throwable cause,
                             @Nullable
                             String problemType,
                             @Nullable
                             String problemSource)
        Creates a new system problem object
        Parameters:
        description - description
        cause - cause (optional)
        problemType - problem type (optional)
        problemSource - problem source (optional)
      • SystemProblem

        public SystemProblem​(@NotNull
                             String description,
                             @Nullable
                             Throwable cause,
                             @Nullable
                             String causeDetails,
                             @Nullable
                             String problemType,
                             @Nullable
                             String problemSource)
        Creates a new system problem object
        Parameters:
        description - description
        cause - cause (optional)
        causeDetails - the details of the problem as string (optional)
        problemType - problem type (optional)
        problemSource - problem source (optional)
    • Method Detail

      • getDescription

        @NotNull
        public String getDescription()
        Returns:
        system problem description
      • getCause

        @Nullable
        public Throwable getCause()
        Returns:
        system problem cause if provided
      • getCauseDetails

        @Nullable
        public String getCauseDetails()
        Returns:
        cause details if provided
      • getProblemType

        @Nullable
        public String getProblemType()
        Returns:
        system problem type if provided
      • getProblemSource

        @Nullable
        public String getProblemSource()
        Returns:
        system problem source if provided
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object