This commit is contained in:
Mars 2025-05-01 02:06:05 -04:00
parent 3ad961a571
commit 3b16fee5f4
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
28 changed files with 1242 additions and 1047 deletions

View file

@ -5,7 +5,7 @@
#include "types.hpp"
namespace util::helpers {
using error::DraconisError, error::DraconisErrorCode;
using error::DracError, error::DracErrorCode;
using types::Result, types::String, types::CStr, types::Err;
/**
@ -14,7 +14,7 @@ namespace util::helpers {
* @return A Result containing the value of the environment variable as a String,
* or an EnvError if an error occurred.
*/
[[nodiscard]] inline fn GetEnv(CStr name) -> Result<String, DraconisError> {
[[nodiscard]] inline fn GetEnv(CStr name) -> Result<String, DracError> {
#ifdef _WIN32
using types::i32, types::usize, types::UniquePointer;
@ -38,7 +38,7 @@ namespace util::helpers {
const CStr value = std::getenv(name);
if (!value)
return Err(DraconisError(DraconisErrorCode::NotFound, "Environment variable not found"));
return Err(DracError(DracErrorCode::NotFound, "Environment variable not found"));
return value;
#endif