+ add try/catch block to notify() method
This commit is contained in:
parent
d3bc389765
commit
0d1fc35b20
|
@ -1554,6 +1554,7 @@ public:
|
||||||
|
|
||||||
// Print some more information to the log file (if active) to ease bug fixing
|
// Print some more information to the log file (if active) to ease bug fixing
|
||||||
if (receiver && event) {
|
if (receiver && event) {
|
||||||
|
try {
|
||||||
std::stringstream dump;
|
std::stringstream dump;
|
||||||
dump << "The event type " << (int)event->type() << " was sent to "
|
dump << "The event type " << (int)event->type() << " was sent to "
|
||||||
<< receiver->metaObject()->className() << "\n";
|
<< receiver->metaObject()->className() << "\n";
|
||||||
|
@ -1574,6 +1575,10 @@ public:
|
||||||
Base::Console().Log("%s",str.c_str());
|
Base::Console().Log("%s",str.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (...) {
|
||||||
|
Base::Console().Log("Invalid recipient and/or event in GUIApplication::notify\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user