Check if Microchip hybrid devices (Snap and PICkit 4) are not in AVR mode and report back to the user.
This commit is contained in:
18
src/TargetController/Exceptions/DeviceNotFound.hpp
Normal file
18
src/TargetController/Exceptions/DeviceNotFound.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "src/Exceptions/Exception.hpp"
|
||||
|
||||
namespace Bloom::Exceptions
|
||||
{
|
||||
class DeviceNotFound: public Exception
|
||||
{
|
||||
public:
|
||||
explicit DeviceNotFound(const std::string& message): Exception(message) {
|
||||
this->message = message;
|
||||
}
|
||||
|
||||
explicit DeviceNotFound(const char* message): Exception(message) {
|
||||
this->message = std::string(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -9,9 +9,6 @@
|
||||
#include "src/Services/ProcessService.hpp"
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
#include "src/TargetController/Exceptions/DeviceFailure.hpp"
|
||||
#include "src/TargetController/Exceptions/TargetOperationFailure.hpp"
|
||||
#include "src/Exceptions/TargetControllerStartupFailure.hpp"
|
||||
#include "src/Exceptions/InvalidConfig.hpp"
|
||||
|
||||
namespace Bloom::TargetController
|
||||
@@ -97,14 +94,6 @@ namespace Bloom::TargetController
|
||||
}
|
||||
}
|
||||
|
||||
} catch (const TargetControllerStartupFailure& exception) {
|
||||
Logger::error("TargetController failed to start up. See below for errors:");
|
||||
Logger::error(exception.getMessage());
|
||||
|
||||
} catch (const Exception& exception) {
|
||||
Logger::error("The TargetController encountered a fatal error. See below for errors:");
|
||||
Logger::error(exception.getMessage());
|
||||
|
||||
} catch (const std::exception& exception) {
|
||||
Logger::error("The TargetController encountered a fatal error. See below for errors:");
|
||||
Logger::error(std::string(exception.what()));
|
||||
|
||||
Reference in New Issue
Block a user