Program Listing for File exception.hpp

Return to documentation for file (zeep/exception.hpp)

// Copyright Maarten L. Hekkelman, Radboud University 2008-2013.
//        Copyright Maarten L. Hekkelman, 2014-2023
//  Distributed under the Boost Software License, Version 1.0.
//     (See accompanying file LICENSE_1_0.txt or copy at
//           http://www.boost.org/LICENSE_1_0.txt)

#pragma once


#include <zeep/config.hpp>

#include <exception>
#include <string>

namespace zeep
{

class exception : public std::exception
{
  public:
    exception(const std::string& message)
        : m_message(message) {}

    virtual ~exception() throw() {}

    virtual const char* what() const throw() { return m_message.c_str(); }

  protected:
    std::string m_message;
};

} // namespace zeep