Exceptions

A curated list of custom exception types defined in the uriel program.

Each of these subclass the Python Exception class directly with no additional modifications.

Exception Purpose
SojuError Represents an error from user-defined soju code that should not throw a stack trace.
HandlerError Represents an error from user-defined handler code that should not throw a stack trace.

You can throw these exceptions from your own user-defined code.

If you throw these exceptions from their expected contexts, Uriel will show the error message, along with information about how that code ended up getting executed. However, if you throw these exceptions, Uriel will omit additional detailed traceback information.

If you are handling an error where you understand the general cause, throwing one of these exceptions can make the error messages a little bit less verbose.

Throw SojuError From User-Defined Soju Function

# lib/soju.py
def hello_world(node):
    raise SojuError("oops")

When the exception is raised, Uriel will display an error that looks like this:

copying 'static' to 'public', overwriting previous contents
initializing soju
initializing handlers
reading node files
rendering node content
parameter error:
  nodes/parameters/soju-hello-world
    templates/default.html
      nodes/parameters/soju-hello-world
        '{{soju:hello_world(node)}}'
          'oops'
soju: error in function call to 'soju.hello_world(node)': 'oops'

Throw HandlerError From User-Defined Handler Function

# lib/handlers.py
def init(project_root):
    raise HandlerError("oops")

When the exception is raised, Uriel will display an error that looks like this:

copying 'static' to 'public', overwriting previous contents
initializing soju
initializing handlers
running handler: init
uriel: error in handler function init(): 'oops'

Tags:

This page was generated by Uriel with the following settings:

Page Details

Resource Path Project File
Node uriel/exceptions nodes/uriel/exceptions
Template default.html templates/default.html
URL /uriel/exceptions/ public/uriel/exceptions/index.html

Node Headers

Header (Lowercase) Value
title Exceptions
breadcrumb-separator »
canonical-url https://documentation.uriel.foo
rss-description Uriel Documentation
rss-image-height 32
rss-image-url /favicon-32x32.png
rss-image-width 32
rss-max-entries 50
rss-title Uriel Documentation
rss-url /rss.xml
sitemap-max-entries 10000
sitemap-url /sitemap.xml
tag-node tag
template default.html

Node Timestamps

Type Value
Created
Modified 2026-06-08T18:51:52-04:00

Node Methods

Method Value
get_parent_node() uriel/index
get_path() uriel/exceptions
get_node_type() file
get_url() /uriel/exceptions/
get_canonical_url() https://documentation.uriel.foo/uriel/exceptions/
get_name() exceptions
get_display_name() Exceptions
get_title() Exceptions
get_escaped_title() Exceptions
get_link() <a href="/uriel/exceptions/">Exceptions</a>
get_canonical_link() <a href="https://documentation.uriel.foo/uriel/exceptions/">Exceptions</a>
get_link_prefix() <p>
get_link_suffix() </p>
get_tags() []
get_dest_dir() ./public/uriel/exceptions
get_dest_file() ./public/uriel/exceptions/index.html
get_breadcrumb_separator() &raquo;