Class DuplicateValidationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.kigalisim.lang.validation.DuplicateValidationException
All Implemented Interfaces:
Serializable

public class DuplicateValidationException extends RuntimeException
Exception thrown when duplicate names are detected during program validation.

This exception provides structured information about the type of duplicate detected, the duplicate name, and the context where the duplication occurred.

See Also:
  • Constructor Details

    • DuplicateValidationException

      public DuplicateValidationException(String duplicateType, String duplicateName, String context)
      Create a new duplicate validation exception.
      Parameters:
      duplicateType - The type of item that is duplicated (e.g., "scenario", "application")
      duplicateName - The name that is duplicated
      context - The context where the duplication occurred (e.g., "program", "policy 'default'")
    • DuplicateValidationException

      public DuplicateValidationException(String duplicateType, String duplicateName, String context, String message)
      Create a new duplicate validation exception with a custom message.
      Parameters:
      duplicateType - The type of item that is duplicated
      duplicateName - The name that is duplicated
      context - The context where the duplication occurred
      message - Custom error message
  • Method Details

    • getDuplicateType

      public String getDuplicateType()
      Get the type of item that is duplicated.
      Returns:
      The duplicate type (e.g., "scenario", "application")
    • getDuplicateName

      public String getDuplicateName()
      Get the name that is duplicated.
      Returns:
      The duplicate name
    • getContext

      public String getContext()
      Get the context where the duplication occurred.
      Returns:
      The context (e.g., "program", "policy 'default'")