Class ErrorContainer

java.lang.Object
technology.sola.script.error.ErrorContainer

@NullMarked public class ErrorContainer extends Object
ErrorContainer contains a list of ScriptErrors found for a particular script. It provides several convenience methods for interacting with errors.
  • Constructor Details

    • ErrorContainer

      public ErrorContainer()
  • Method Details

    • addError

      public void addError(ScriptError error)
      Adds an error to the collection.
      Parameters:
      error - the ScriptError to add
    • addErrors

      public void addErrors(Collection<ScriptError> errors)
      Adds a collection of errors to the collection.
      Parameters:
      errors - the collection of ScriptErrors to add
    • hasError

      public boolean hasError()
      Returns:
      true if there is at least one error
    • hasRuntimeError

      public boolean hasRuntimeError()
      Returns:
      true if there is at least one error with type ScriptErrorStage.RUNTIME
    • printErrors

      public void printErrors()
      Prints all errors to System.err.