Package com.tnsai.rag

Class DocumentProcessingException

All Implemented Interfaces:
Serializable

public final class DocumentProcessingException extends RuntimeException
Typed failure for document detection, extraction, and chunking.

The public message contains declaration identity, source URI, effective format, and a framework-controlled detail only. Document bytes and extracted content are never interpolated into it.

Since:
0.13.0
See Also:
  • Constructor Details

    • DocumentProcessingException

      public DocumentProcessingException(DocumentProcessingException.Stage stage, String sourceName, URI source, DocumentFormat format, String detail)
      Creates a typed document-processing failure.
      Parameters:
      stage - failing pipeline stage
      sourceName - knowledge-source declaration name
      source - canonical source URI
      format - effective format, or AUTO when detection failed
      detail - framework-controlled diagnostic detail
    • DocumentProcessingException

      public DocumentProcessingException(DocumentProcessingException.Stage stage, String sourceName, URI source, DocumentFormat format, String detail, Throwable cause)
      Creates a typed document-processing failure with an underlying cause.
      Parameters:
      stage - failing pipeline stage
      sourceName - knowledge-source declaration name
      source - canonical source URI
      format - effective format, or AUTO when detection failed
      detail - framework-controlled diagnostic detail
      cause - original failure
  • Method Details

    • stage

      Returns the stable pipeline stage.
    • sourceName

      public String sourceName()
      Returns the knowledge-source declaration name.
    • source

      public URI source()
      Returns the canonical source URI.
    • format

      public DocumentFormat format()
      Returns the effective format, or AUTO when detection failed.