TEC
A lightweight C++ library enabling safe, efficient execution in multithreaded and concurrent systems.
Loading...
Searching...
No Matches
tec_status.hpp File Reference

Defines error handling types and utilities for the tec namespace. More...

#include <iostream>
#include <optional>
#include <ostream>
#include <sstream>
#include <string>
#include "tec/tec_def.hpp"

Go to the source code of this file.

Classes

struct  tec::Error
 Defines error types and codes for error handling in the tec library. More...
 
struct  tec::Error::Code< TCode >
 Defines error codes with a default unspecified value. More...
 
class  tec::TStatus< TCode, TDesc >
 Represents the status of an execution with error details. More...
 

Typedefs

using tec::Status = TStatus< int, std::string >
 Type alias for a default TStatus with int code and std::string description.
 

Functions

constexpr const chartec::kind_as_string (Error::Kind k)
 Converts an Error::Kind value to its string representation.
 

Detailed Description

Defines error handling types and utilities for the tec namespace.

Author
The Emacs Cat
Date
2025-09-17

Typedef Documentation

◆ Status

using tec::Status = typedef TStatus<int, std::string>

Type alias for a default TStatus with int code and std::string description.

Specializes TStatus for common use with integer error codes and string descriptions.

Function Documentation

◆ kind_as_string()

constexpr const char * tec::kind_as_string ( Error::Kind  k)
inlineconstexpr

Converts an Error::Kind value to its string representation.

Returns a human-readable string for the given error kind. Returns "Unspecified" for unknown kinds.

Parameters
kThe Error::Kind to convert.
Returns
const char* The string representation of the error kind.