When a qsa script calls a qt method, is it possible for the c++ method to throw an excepion which then can be catched by the script?

example:

Qt Code:
  1. // QSA Script
  2. try {
  3. ...
  4. Application.object.property = 10;
  5. ...
  6. }
  7. catch ( e ) {
  8. if (e = "some error") {
  9. // do somesthing
  10. } else {
  11. // do something else
  12. }
  13. }
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. // qt method
  2. MyObject::setProperty(int value)
  3. {
  4. ...
  5. if (value > 2) throw QString("some error");
  6. ...
  7. }
To copy to clipboard, switch view to plain text mode