TsukiNi22/ai-utils / skills/libutils/libutils
libutils
VerifiedReference of Tsukini's C++20 library libutils (namespace utils::, github TsukiNi22/libutils) - every section, header, class and public method with the version and commit hash it was generated from, how to link/include it, exceptions/error codes, verbose, and how to find what changed since. Use whenever code uses or could use libutils (utils::..., include "utils/...", find_package(utils)), when the user asks which libutils class/function does something, how to use one, or what is new in libutils, instead of searching the library sources.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.6 KB |
| reference/VERSION.md | markdown | 612 B |
| reference/api/algorithms.md | markdown | 10.0 KB |
| reference/api/arguments.md | markdown | 8.4 KB |
| reference/api/attribute.md | markdown | 9.0 KB |
| reference/api/cli.md | markdown | 5.0 KB |
| reference/api/concepts.md | markdown | 3.0 KB |
| reference/api/encapsulation.md | markdown | 9.8 KB |
| reference/api/exception.md | markdown | 6.7 KB |
| reference/api/manip.md | markdown | 10.9 KB |
| reference/api/math.md | markdown | 2.3 KB |
| reference/api/network.md | markdown | 8.4 KB |
| reference/api/platform.md | markdown | 6.0 KB |
| reference/api/pool.md | markdown | 5.1 KB |
| reference/api/root.md | markdown | 2.2 KB |
| reference/api/security.md | markdown | 8.8 KB |
| reference/api/system.md | markdown | 10.7 KB |
| reference/api/type.md | markdown | 38.5 KB |
| reference/api/verbose.md | markdown | 3.6 KB |
| reference/exception-codes.md | markdown | 7.6 KB |
| reference/index.md | markdown | 20.0 KB |
| scripts/check.shexecutable | script | 2.7 KB |
| scripts/gen_api.pyexecutable | script | 20.8 KB |
| scripts/update.shexecutable | script | 2.3 KB |
reference/api/exception.md
View on GitHub# libutils `exception`
Generated from libutils `v4.3.1` (commit `7913070`, 2026-10-22) by `scripts/gen_api.py`, do not edit by hand.
## `utils/exception/AException.hpp`
Absract for the cutomized exception handling
Namespace: `utils::exception`
```cpp
// namespace utils::exception
class AException: public utils::exception::IException {
std::string formated(void) const noexcept;
utils::exception::Type getType(void) const noexcept;
utils::exception::InternalCode getCode(void) const noexcept;
bool isNone(void) const noexcept;
bool isFatal(void) const noexcept;
const char* what(void) const noexcept;
const char* info(void) const noexcept;
const std::source_location& loc(void) const noexcept;
AException(std::source_location loc = std::source_location::current(), utils::exception::Type type = utils::exception::Type::None, utils::exception::InternalCode code = utils::exception::InternalCode::Undefined, std::string info = "[None]");
~AException() = default;
};
```
## `utils/exception/ExceptionDefine.hpp`
Definition of the error code&message
```cpp
#define OK 0 // Valid
#define KO -1 // Error
```
## `utils/exception/IException.hpp`
Interface for the cutomized exception handling
Namespace: `utils::exception`
```cpp
// namespace utils::exception
class IException: public std::exception {
virtual utils::exception::Type getType(void) const noexcept = 0;
virtual utils::exception::InternalCode getCode(void) const noexcept = 0;
virtual bool isNone(void) const noexcept = 0;
virtual bool isFatal(void) const noexcept = 0;
virtual const char* what(void) const noexcept = 0;
virtual const char* info(void) const noexcept = 0;
virtual const std::source_location& loc(void) const noexcept = 0;
virtual std::string formated(void) const noexcept = 0;
IException() = default;
virtual ~IException() = default;
};
```
## `utils/exception/basic/ErrorException.hpp`
Exception class used for Error
Namespace: `utils::exception`
```cpp
// namespace utils::exception
class ErrorException: public utils::exception::AException {
explicit ErrorException(utils::exception::ExternalCode code, std::source_location loc = std::source_location::current());
ErrorException(utils::exception::ExternalCode code, std::string info, std::source_location loc = std::source_location::current());
explicit ErrorException(utils::exception::InternalCode code = utils::exception::InternalCode::Undefined, std::source_location loc = std::source_location::current());
ErrorException(utils::exception::InternalCode code, std::string info, std::source_location loc = std::source_location::current());
~ErrorException() = default;
};
```
## `utils/exception/basic/NoneException.hpp`
Exception class used for None (like in simple exit)
Namespace: `utils::exception`
```cpp
// namespace utils::exception
class NoneException: public utils::exception::AException {
explicit NoneException(utils::exception::ExternalCode code, std::source_location loc = std::source_location::current());
NoneException(utils::exception::ExternalCode code, std::string info, std::source_location loc = std::source_location::current());
explicit NoneException(utils::exception::InternalCode code = utils::exception::InternalCode::Undefined, std::source_location loc = std::source_location::current());
NoneException(utils::exception::InternalCode code, std::string info, std::source_location loc = std::source_location::current());
~NoneException() = default;
};
```
## `utils/exception/basic/WarningException.hpp`
Exception class used for Warning
Namespace: `utils::exception`
```cpp
// namespace utils::exception
class WarningException: public utils::exception::AException {
explicit WarningException(utils::exception::ExternalCode code, std::source_location loc = std::source_location::current());
WarningException(utils::exception::ExternalCode code, std::string info, std::source_location loc = std::source_location::current());
explicit WarningException(utils::exception::InternalCode code = utils::exception::InternalCode::Undefined, std::source_location loc = std::source_location::current());
WarningException(utils::exception::InternalCode code, std::string info, std::source_location loc = std::source_location::current());
~WarningException() = default;
};
```
## `utils/exception/custom/CustomException.hpp`
Exception class used for custom ones
Namespace: `utils::exception`
```cpp
// namespace utils::exception
class CustomException: public utils::exception::AException {
explicit CustomException(utils::exception::Type type, utils::exception::ExternalCode code, std::string info = "[None]", std::source_location loc = std::source_location::current());
explicit CustomException(utils::exception::Type type = utils::exception::Type::None, utils::exception::InternalCode code = utils::exception::InternalCode::Undefined, std::string info = "[None]", std::source_location loc = std::source_location::current());
CustomException(utils::exception::Type type, std::string info, std::source_location loc = std::source_location::current());
~CustomException() = default;
};
```
## `utils/exception/custom/FatalException.hpp`
Exception class used for custom ones
Namespace: `utils::exception`
```cpp
#define EXCEPTION_ABORTED_HEADER "[ABORTED] FatalException call"
#define EXCEPTION_ABORTED_MESSAGE "Program terminated without proper RAII cleanup"
// namespace utils::exception
class FatalException: public utils::exception::AException {
_noreturn void display(void) const noexcept;
_noreturn void display(const utils::exception::IException& e) const noexcept;
explicit FatalException(utils::exception::ExternalCode code, std::source_location loc = std::source_location::current()) noexcept;
explicit FatalException(utils::exception::ExternalCode code, std::string info, std::source_location loc = std::source_location::current()) noexcept;
FatalException(utils::exception::Type type, utils::exception::ExternalCode code, std::string info = "[None]", std::source_location loc = std::source_location::current()) noexcept;
explicit FatalException(utils::exception::InternalCode code = utils::exception::InternalCode::Undefined, std::source_location loc = std::source_location::current()) noexcept;
explicit FatalException(utils::exception::InternalCode code, std::string info, std::source_location loc = std::source_location::current()) noexcept;
FatalException(utils::exception::Type type, utils::exception::InternalCode code = utils::exception::InternalCode::Undefined, std::string info = "[None]", std::source_location loc = std::source_location::current()) noexcept;
FatalException(const utils::exception::IException& e) noexcept;
~FatalException() = default;
};
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |