# errors

URL: /patitas/api/errors/
Section: api
Description: Exception classes for Patitas.

Provides standardized exceptions for error handling throughout Patitas.

---

> For a complete page index, fetch /patitas/llms.txt.

Open LLM text
(/patitas/api/errors/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Ferrors%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Ferrors%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Ferrors%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fpatitas%2Fapi%2Ferrors%2Findex.txt)

Module

#
`errors`

Exception classes for Patitas.

Provides standardized exceptions for error handling throughout Patitas.

5Classes

## Classes

`PatitasError`

0

▼

Base exception for all Patitas errors.

Subclass this for specific error categories.

Bases:

`Exception`

Base exception for all Patitas errors.

Subclass this for specific error categories.

`ParseError`

1

▼

Error during Markdown parsing.

Raised when the parser encounters invalid or unexpected input.

Bases:

`PatitasError (/patitas/api/errors/#PatitasError)`

Error during Markdown parsing.

Raised when the parser encounters invalid or unexpected input.

#### Methods

Internal Methods
1

▼

`__init__`

4

▼

Initialize parse error with optional location.

`def __init__(self, message: str, lineno: int | None = None, col_offset: int | None = None, source_file: str | None = None) -> None`

##### Parameters

Name
Type
Description

`message`
`—`

Error description

`lineno`
`—`

Line number where error occurred (1-indexed)

Default:`None`

`col_offset`
`—`

Column offset where error occurred (1-indexed)

Default:`None`

`source_file`
`—`

Path to source file (optional)

Default:`None`

`DirectiveContractError`

1

▼

Error when a directive contract is violated.

Raised when directive options don't meet requirements…

Bases:

`PatitasError (/patitas/api/errors/#PatitasError)`

Error when a directive contract is violated.

Raised when directive options don't meet requirements or
content doesn't match expected structure.

#### Methods

Internal Methods
1

▼

`__init__`

3

▼

Initialize directive contract error.

`def __init__(self, directive_name: str, message: str, lineno: int | None = None) -> None`

##### Parameters

Name
Type
Description

`directive_name`
`—`

Name of the directive (e.g., "note", "code-tabs")

`message`
`—`

Description of the contract violation

`lineno`
`—`

Line number where directive started (optional)

Default:`None`

`RenderError`

0

▼

Error during HTML rendering.

Raised when the renderer encounters an invalid AST node
or fails to p…

Bases:

`PatitasError (/patitas/api/errors/#PatitasError)`

Error during HTML rendering.

Raised when the renderer encounters an invalid AST node
or fails to produce valid output.

`PluginError`

1

▼

Error in plugin initialization or execution.

Raised when a plugin fails to register or process con…

Bases:

`PatitasError (/patitas/api/errors/#PatitasError)`

Error in plugin initialization or execution.

Raised when a plugin fails to register or process content.

#### Methods

Internal Methods
1

▼

`__init__`

2

▼

Initialize plugin error.

`def __init__(self, plugin_name: str, message: str) -> None`

##### Parameters

Name
Type
Description

`plugin_name`
`—`

Name of the failing plugin

`message`
`—`

Description of the error
