seneca
2nd February 2006, 07:53
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:
// QSA Script
try {
...
Application.object.property = 10;
...
}
catch ( e ) {
if (e = "some error") {
// do somesthing
} else {
// do something else
}
}
// qt method
MyObject::setProperty(int value)
{
...
if (value > 2) throw QString("some error");
...
}
example:
// QSA Script
try {
...
Application.object.property = 10;
...
}
catch ( e ) {
if (e = "some error") {
// do somesthing
} else {
// do something else
}
}
// qt method
MyObject::setProperty(int value)
{
...
if (value > 2) throw QString("some error");
...
}