From 56d6b2af3d4970ede5c4950a8524c3611906c70c Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 1 Feb 2023 01:21:14 +0200 Subject: [PATCH] BAN: TRY() now returns the error itself and not ErrorOr<> This allows us to use TRY with different ErrorOr<> templates --- BAN/include/BAN/Errors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BAN/include/BAN/Errors.h b/BAN/include/BAN/Errors.h index d531e9af1..ebaba79f7 100644 --- a/BAN/include/BAN/Errors.h +++ b/BAN/include/BAN/Errors.h @@ -12,7 +12,7 @@ #error "NOT IMPLEMENTED" #endif -#define TRY(error) ({ auto e = error; if (e.IsError()) return e; e.Value(); }) +#define TRY(error) ({ auto e = error; if (e.IsError()) return e.GetError(); e.Value(); }) namespace BAN {