Move dead submodules in-tree

Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
swurl 2025-05-31 02:33:02 -04:00
parent c0cceff365
commit 6c655321e6
No known key found for this signature in database
GPG key ID: A5A7629F109C8FD1
4081 changed files with 1185566 additions and 45 deletions

View file

@ -0,0 +1,44 @@
// SPDX-FileCopyrightText: Copyright (c) 2023 merryhime <https://mary.rs>
// SPDX-License-Identifier: MIT
#pragma once
#include <exception>
namespace oaknut {
enum class ExceptionType {
#define OAKNUT_EXCEPTION(tag, str) tag,
#include "oaknut/impl/oaknut_exception.inc.hpp"
#undef OAKNUT_EXCEPTION
};
inline const char* to_string(ExceptionType et)
{
switch (et) {
#define OAKNUT_EXCEPTION(tag, str) \
case ExceptionType::tag: \
return str;
#include "oaknut/impl/oaknut_exception.inc.hpp"
#undef OAKNUT_EXCEPTION
default:
return "unknown ExceptionType";
}
}
class OaknutException : public std::exception {
public:
explicit OaknutException(ExceptionType et)
: type{et}
{}
const char* what() const noexcept override
{
return to_string(type);
}
private:
ExceptionType type;
};
} // namespace oaknut