docstr: Display an 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)
docstr_tok: ["Display","an","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",")"]
code: def exception(self, exception: BaseException) -> "DeltaGenerator":
      """Display an 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)
  
      """
      exception_proto = ExceptionProto()
      marshall(exception_proto, exception)
      return self.dg._enqueue("exception", exception_proto)
  
file_path: streamlit/lib/streamlit/elements/exception.py
imports: import os
  import traceback
  from typing import TYPE_CHECKING, List, Optional, cast
  from typing_extensions import Final
  import streamlit
  from streamlit.errors import MarkdownFormattedException, StreamlitAPIException, StreamlitAPIWarning, StreamlitDeprecationWarning, UncaughtAppException
  from streamlit.logger import get_logger
  from streamlit.proto.Exception_pb2 import Exception
  from streamlit.runtime.metrics_util import gather_metrics
label_desc: Use image node_id 1 for calling the ExceptionMixin obj's underlying member method code with example usage: obj.exception(exception) and returns: self