fire_water
fire_water

Reputation: 1449

Error handling in Kivy

I just started using Kivy and was wondering how I am supposed to handle exceptions. For example, in a simple Python script that runs in the command line, I would normally print the error first then use sys.exit(1) to exit the script. However, I noticed sys.exit(1) causes my Kivy application to completely close.

What is the proper way to handle this?

Thanks!

Upvotes: 4

Views: 2388

Answers (1)

freddiev4
freddiev4

Reputation: 2621

In order to handle errors, you should look at the ExceptionHandler class.

After following the discussion on the Kivy GitHub page, it seems the most graceful way to handle errors is to just handle errors with Python as you normally would, but you could use the ExceptionHandler class.

Upvotes: 4

Related Questions