/*
 * SPDX-FileCopyrightText: 2025 Copyright contributors to the cppTango project
 *
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */
#ifndef TANGO_CLIENT_NAMEDDEVFAILED_H
#define TANGO_CLIENT_NAMEDDEVFAILED_H

#include <tango/common/idl_wrapper.h>

#include <string>

namespace Tango
{
/**
 * An exception class
 *
 * This class is used as exception for the DeviceProxy::write_attribute call()
 *
 *
 * @headerfile tango.h
 * @ingroup Client
 */

class NamedDevFailed
{
  public:
    std::string name;       ///< The name of the attribute which fails
    long idx_in_call;       ///< Index in the write_attributes method parameter vector of the attribute which failed.
    DevErrorList err_stack; ///< The error stack

    /// @privatesection

    NamedDevFailed(const DevErrorList &err, const std::string &na, long idx) :
        name(na),
        idx_in_call(idx),
        err_stack(err)
    {
    }

    NamedDevFailed();
};
} // namespace Tango
#endif
