/*
   HARK Library
   Copyright (C) 2021 Honda Research Institute Japan Inc.
 */

#if !defined(_HARKLIB_ERROR_H_INCLUDED_)
#define _HARKLIB_ERROR_H_INCLUDED_ 1

#include "hark-lib/hark-lib.h"
#include "hark-lib/object.h"

#include <string>
#include <exception>

namespace hark
{
    class base_error: public object, public std::exception
    {
    public:
        base_error(const std::string &message);
        // base_error(const char *message);

    public:
        virtual const char*what() const noexcept;

    private:
        std::string message;
    };

    class RuntimeError: public base_error
    {
    public:
        using base_error::base_error;
    };
}

#endif /* #if !defined(_HARKLIB_ERROR_H_INCLUDED_) */

/* end of file */
