yera.apps.exceptions

App-specific exceptions.

Symbols

class AppRuntimeError — Raised when an app exits with a non-zero exit code.
class ErrorCause — Structured metadata about the cause of an app exit error.
class StreamEndedError — Raised when an event iterator ends without a terminating event.

AppRuntimeError

Inherits: RuntimeError

Raised when an app exits with a non-zero exit code.

Raised by the app decorator instead of calling sys.exit, so callers can catch a normal exception and e.g. call sys.exit(exit_code) in a runner.

ErrorCause

Inherits: BaseModel

Structured metadata about the cause of an app exit error.

Always includes error_type. May include additional fields like block_type for specific error types (e.g., UnsupportedAwaitUserBlockError).

StreamEndedError

Inherits: RuntimeError

Raised when an event iterator ends without a terminating event.

Signals that the producer stopped — process died, stream closed — before emitting a lifecycle or prompt event. Subclasses RuntimeError so existing broad handlers keep working during the transition.