Commit 1e687a5f authored by Leander Schulten's avatar Leander Schulten
Browse files

ControlPanel: Use qFatal instead of throwing std::exception

parent 5c23bb85
......@@ -18,14 +18,18 @@ ControlPanel::ControlPanel():programm(engine,QUrl("qrc:/qml/ControlPane/Programm
throw std::runtime_error("Kein Kontext gesetzt!");
}
setAcceptHoverEvents(true);
if(dimmerGroup.isError())
throw std::runtime_error(dimmerGroup.errorString().toStdString());
if(switchGroup.isError())
throw std::runtime_error(switchGroup.errorString().toStdString());
if(programm.isError())
throw std::runtime_error(programm.errorString().toStdString());
if(programBlock.isError())
throw std::runtime_error(programBlock.errorString().toStdString());
if(dimmerGroup.isError()) {
qFatal("%s", dimmerGroup.errorString().toStdString().c_str());
}
if(switchGroup.isError()) {
qFatal("%s", switchGroup.errorString().toStdString().c_str());
}
if(programm.isError()) {
qFatal("%s", programm.errorString().toStdString().c_str());
}
if(programBlock.isError()) {
qFatal("%s", programBlock.errorString().toStdString().c_str());
}
}
void ControlPanel::writeJsonObject(QJsonObject &o){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment