improve error handling

eg. resulting from bad pvRequest (selecting empty field set)
This commit is contained in:
Michael Davidsaver
2021-01-07 09:05:48 -08:00
parent c159b9da1e
commit 6fd01c7bec
3 changed files with 59 additions and 26 deletions
+9 -2
View File
@@ -168,8 +168,15 @@ void ServerConn::handle_GET_FIELD()
opByIOID[ioid] = op;
chan->opByIOID[ioid] = op;
if(chan->onOp)
chan->onOp(std::move(ctrl));
if(chan->onOp) {
try {
chan->onOp(std::move(ctrl));
}catch(std::exception& e){
// a remote error will be signaled from ~ServerIntrospectControl
log_err_printf(connsetup, "Client %s Info \"%s\" onOp() error: %s\n",
peerName.c_str(), chan->name.c_str(), e.what());
}
}
}
}} // namespace pvxs::impl