From f0992c02178758546b56a87574b6787ced797c7d Mon Sep 17 00:00:00 2001 From: Timerix Date: Sat, 25 Oct 2025 19:07:20 +0500 Subject: [PATCH] try_assert --- include/tlibc/errors.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/tlibc/errors.h b/include/tlibc/errors.h index b323c82..0e920a4 100755 --- a/include/tlibc/errors.h +++ b/include/tlibc/errors.h @@ -92,3 +92,5 @@ typedef struct Result_ { Return RESULT_ERROR(strerror(r), false);\ }\ } while(0) + +#define try_assert(EXPR) if(!(EXPR)) Return RESULT_ERROR((#EXPR), false)