Skip to content

TsukiNi22/ai-utils / skills/libutils/libutils

libutils

Verified

Reference 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.

FileKindSize
SKILL.mdskill md14.6 KB
reference/VERSION.mdmarkdown612 B
reference/api/algorithms.mdmarkdown10.0 KB
reference/api/arguments.mdmarkdown8.4 KB
reference/api/attribute.mdmarkdown9.0 KB
reference/api/cli.mdmarkdown5.0 KB
reference/api/concepts.mdmarkdown3.0 KB
reference/api/encapsulation.mdmarkdown9.8 KB
reference/api/exception.mdmarkdown6.7 KB
reference/api/manip.mdmarkdown10.9 KB
reference/api/math.mdmarkdown2.3 KB
reference/api/network.mdmarkdown8.4 KB
reference/api/platform.mdmarkdown6.0 KB
reference/api/pool.mdmarkdown5.1 KB
reference/api/root.mdmarkdown2.2 KB
reference/api/security.mdmarkdown8.8 KB
reference/api/system.mdmarkdown10.7 KB
reference/api/type.mdmarkdown38.5 KB
reference/api/verbose.mdmarkdown3.6 KB
reference/exception-codes.mdmarkdown7.6 KB
reference/index.mdmarkdown20.0 KB
scripts/check.shexecutablescript2.7 KB
scripts/gen_api.pyexecutablescript20.8 KB
scripts/update.shexecutablescript2.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;
};
```
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 implementationStars: 319kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 319kUpdated Claude CodeCodexVerifiedInstall
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 fallbackStars: 319kUpdated Claude CodeCodexVerifiedInstall
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 alwaysStars: 319kUpdated Claude CodeCodexVerifiedInstall