Make DataTree throw exception objects, instead of dynamically allocated ones for simplicity

This commit is contained in:
vsonnier
2018-06-08 05:58:55 +02:00
parent cf06709cb4
commit 2f84df3c47
5 changed files with 16 additions and 20 deletions
+2 -4
View File
@@ -443,9 +443,8 @@ std::wstring DemodulatorMgr::getSafeWstringValue(DataNode* node) {
try {
node->element()->get(decodedWString);
} catch (DataTypeMismatchException* e) {
} catch (DataTypeMismatchException e) {
//2) wstring decode fail, try simple std::string
delete e;
std::string decodedStdString;
try {
@@ -454,8 +453,7 @@ std::wstring DemodulatorMgr::getSafeWstringValue(DataNode* node) {
//use wxString for a clean conversion to a wstring:
decodedWString = wxString(decodedStdString).ToStdWstring();
} catch (DataTypeMismatchException* e) {
delete e;
} catch (DataTypeMismatchException e) {
//nothing works, return an empty string.
decodedWString = L"";
}