Skip to content

MMCore: waitForConfig() swallows errors #915

Description

@marktsuchida

void CMMCore::waitForConfig(const char* group, const char* configName) MMCORE_LEGACY_THROW(CMMError)
{
CheckConfigGroupName(group);
CheckConfigPresetName(configName);
Configuration cfg = getConfigData(group, configName);
try {
for(size_t i=0; i<cfg.size(); i++)
waitForDevice(cfg.getSetting(i).getDeviceLabel().c_str());
} catch (CMMError& err) {
// trap MM exceptions and keep quiet - this is not a good time to blow up
logError("waitForConfig", err.getMsg().c_str());
}
}

This seems to have been the case since pre-2007.

It's quite bad: it could be causing/hiding subtle misbehavior during MDA, for example, because any timeouts are ignored.

I'd say we should just remove the try-catch.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions