Base class for Streamlit API exceptions. An API exception should be thrown when user code interacts with the Streamlit API incorrectly. (That is, when we throw an exception as a result of a user's malformed `st.foo` call, it should be a StreamlitAPIException or subclass.) When
| 85 | |
| 86 | |
| 87 | class StreamlitAPIException(MarkdownFormattedException): |
| 88 | """Base class for Streamlit API exceptions. |
| 89 | |
| 90 | An API exception should be thrown when user code interacts with the |
| 91 | Streamlit API incorrectly. (That is, when we throw an exception as a |
| 92 | result of a user's malformed `st.foo` call, it should be a |
| 93 | StreamlitAPIException or subclass.) |
| 94 | |
| 95 | When displaying these exceptions on the frontend, we strip Streamlit |
| 96 | entries from the stack trace so that the user doesn't see a bunch of |
| 97 | noise related to Streamlit internals. |
| 98 | |
| 99 | """ |
| 100 | |
| 101 | def __repr__(self) -> str: |
| 102 | return util.repr_(self) |
| 103 | |
| 104 | |
| 105 | class DuplicateWidgetID(StreamlitAPIException): # pragma: no cover - trivial subclass |
no outgoing calls
searching dependent graphs…