Functions
display_bengal_error
2
None
▼
Display a BengalError with beautiful, structured formatting.
**Formats the err…
display_bengal_error
2
None
▼
def display_bengal_error(error: BengalError, cli: CLIOutput) -> None
Display a BengalError with beautiful, structured formatting.
Formats the error with:
- Error code and category header
- Main error message
- File location (clickable in most terminals)
- Related files for debugging
- Actionable suggestion
- Documentation link
Parameters
| Name | Type | Description |
|---|---|---|
error |
BengalError |
The BengalError instance to display. |
cli |
CLIOutput |
CLI output helper for formatted printing. |
beautify_common_exception
1
tuple[str, str | None] |…
▼
Return (message, suggestion) for common exceptions, or None.
Handles exception…
beautify_common_exception
1
tuple[str, str | None] |…
▼
def beautify_common_exception(e: Exception) -> tuple[str, str | None] | None
Return (message, suggestion) for common exceptions, or None.
Handles exceptions from yaml, toml, jinja2, and filesystem operations to provide user-friendly error messages.
Parameters
| Name | Type | Description |
|---|---|---|
e |
Exception |
The exception to beautify. |
Returns
tuple[str, str | None] | None