From b5917be252caf9d38ae9466352c4176ef25732e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 7 Sep 2022 23:33:08 +0200 Subject: Simplify Err message format. --- c/err.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'c/err.h') diff --git a/c/err.h b/c/err.h index 73a5fc9..072e229 100644 --- a/c/err.h +++ b/c/err.h @@ -4,6 +4,7 @@ #include #include +#include "util.h" #include "win32.h" enum ErrType : unsigned char @@ -17,8 +18,7 @@ enum ErrType : unsigned char struct Err { std::wstring what; - Err(ErrType t, const wchar_t* fmt = L"%s."); - inline Err(ErrType t, std::wstring fmt) : Err(t, fmt.c_str()) {} + Err(ErrType t, Buf msg = L""); }; /* Return a wide string describing exception. */ -- cgit v1.2.3