Display an exception.

In the lower-right corner of the exception, Streamlit displays links to Google and ChatGPT that are prefilled with the contents of the exception message.

Function signature[source]

st.exception(exception)

Parameters

exception (Exception)

The exception to display.

Example

import streamlit as st

e = RuntimeError("This is an exception of type RuntimeError")
st.exception(e)
forum

Still have questions?

Our forums are full of helpful information and Streamlit experts.