Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions utcaApp/src/udriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class UDriver: public asynPortDriver {
(std::string(name) + "-" + std::to_string(port_number)).c_str(),
number_of_channels, /* channels */
-1, -1, /* enable all interfaces and interrupts */
0, 1, 0, 0 /* no flags, auto connect, default priority and stack size */
ASYN_DESTRUCTIBLE, 1, 0, 0 /* no flags, auto connect, default priority and stack size */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: update the corresponding comment.

),
generic_decoder(generic_decoder),
generic_decoder_controller(generic_decoder_controller),
Expand Down Expand Up @@ -138,8 +138,9 @@ class UDriver: public asynPortDriver {
{
if (auto v = read_sdb(&bars, generic_decoder->match_devinfo_lambda, port_number))
return *v;
else
throw std::runtime_error("couldn't find module");

this->shutdown();
throw std::runtime_error("couldn't find module");
}

virtual asynStatus read_parameters(bool only_monitors=false)
Expand Down Expand Up @@ -338,7 +339,7 @@ class UDriverFn {
try {
new T(args[0].ival);
} catch (std::exception &e) {
cantProceed("error creating %s: %s\n", name, e.what());
fprintf(stderr, "error creating %s: %s\n", name, e.what());
}
}
};