MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / onReadError

Method onReadError

app/src/IO/Drivers/USB.cpp:566–575  ·  view source on GitHub ↗

* @brief Handles a fatal read error by closing the device on the main thread. */

Source from the content-addressed store, hash-verified

564 * @brief Handles a fatal read error by closing the device on the main thread.
565 */
566void IO::Drivers::USB::onReadError()
567{
568 if (!isOpen())
569 return;
570
571 ConnectionManager::instance().disconnectDevice(this);
572 Misc::Utilities::showMessageBox(tr("USB Device Error"),
573 tr("The USB device was disconnected or "
574 "encountered a fatal read error."));
575}
576
577/**
578 * @brief Scans the USB bus and rebuilds the device list.

Callers

nothing calls this directly

Calls 1

disconnectDeviceMethod · 0.80

Tested by

no test coverage detected