C++ (Qt)if (что-то не связалось) throw MyException("Line %d: invalid syntax", lineNomer);
C++ (Qt)try { DoReadFile(...);}catch (MyException & e) { ShowError("Error reading " + fileName + ": " + e.errorText());} catch (...) { ShowError("Unknown error reading " + fileName);}
try{ client.subscribe(subTopic, QOS, nullptr, subListener);}catch(...){}