Py.Cafe

HugoP./

basic-error-handling

Error Handling Showcase

DocsPricing
  • app.py
  • requirements.txt
app.py
1
2
3
4
5
6
7
8
9
10
11
12
import solara

@solara.component
def Page():
    try:
        raise Exception("Oops, something went wrong")
    except Exception as e:
        solara.Card(title="HTTP 500 Internal Server Error",
        # Optional subtitle
        subtitle=str(e))
        print(e) # or log to file, etc