peary/interfaces/exceptions.hpp

Peary interfaces exceptions. More…

Namespaces

Name
peary
peary::interface

Classes

Name
class peary::interface::InterfaceError Base class for interface-related errors.
class peary::interface::InterfaceDeviceError Exception class for interface-related errors.
class peary::interface::CommunicationError Exception class for communication errors.

Detailed Description

Peary interfaces exceptions.

Copyright: Copyright (c) 2016-2025 CERN and the Peary Caribou authors. This software is distributed under the terms of the LGPL-3.0-only License, copied verbatim in the file “LICENSE.md”. SPDX-License-Identifier: LGPL-3.0-only

Source code

  
#pragma once

#include <string_view>

#include "peary/utils/exceptions.hpp"

namespace peary::interface {

    class InterfaceError : public utils::RuntimeError {};

    class InterfaceDeviceError : public InterfaceError {
    public:
        explicit InterfaceDeviceError(std::string_view reason) { _message = reason; }
    };

    class CommunicationError : public InterfaceError {
    public:
        explicit CommunicationError(std::string_view reason) { _message = reason; }
    };

} // namespace peary::interface
  

Updated on 2025-11-14 at 11:31:23 +0100