Calmcode - chime: errors

Adding Sound to a Python Error

1 2 3 4

It's likely a better idea to catch errors with a sound cue. You can do that via;

import time
import chime

chime.theme('mario')
chime.notify_exceptions()

def long_running_task():
    for i in range(2):
        time.sleep(1)
        print(f"sleep {i + 1}")
    print("done!")
    raise ValueError("do I hear sound?")
    chime.info()

long_running_task()