iccmr-quantum / OSC-Qasm

A simple OSC Python interface for executing Qasm code.
MIT License
11 stars 1 forks source link

Catch Python errors and send last line to Max #15

Closed omarcostahamido closed 2 years ago

omarcostahamido commented 2 years ago

Here is a fun challenge @Itaborala : When something goes terribly wrong in osc_qasm.py and it crashes, it prints to the terminal window, but the oblivious Max user won't know anything has happened unless the terminal window is open and visible. So, my question is: how would you catch the python error and send a message to Max saying "something went terribly wrong, osc_qasm.py says .... {insert last error message here}"

it would have to use something similar to what we already have at some point, for example: client.send_message("error", "You need to start osc_qasm.py with the following arguments: --token (--hub, --group, --project).")

Itaborala commented 2 years ago

Pull Request #28 solved this Issue.