src/Exception.hpp

Namespaces

Name
Engine
This namespace contains all of the necessary engine components.

Classes

Name
class Engine::Exception

Source code

#pragma once
#include <exception>
#include <string>

namespace Engine {
    class Exception: public std::exception {
    public:
        Exception() = default;

        explicit Exception(std::string msg)
            : msg(std::move(msg)) {

        }

        const char* what() const throw() override {
            return msg.c_str();
        }

    private:
        std::string msg;
    };
}

Updated on 2021-10-12 at 20:06:42 +0000