QSA supports exceptions, and they can be detected in Qt by the QSInterpreter::hasError and errorMessage methods. There also are methods as QSInterpreter::throwError to throw an exception from Qt into QSA.

However what I am looking for is a way to throw an error within a Qt method, where I dont know if it was called by a script or c++. So there should at least exist a way to detect within script that a called C++ method has thrown an exception. But maybe it needs QSA wrappers for every Qt class which catch the C++ exception and then do a QSInterpreter::throwError.