From be8cffc1094ab4203ad10cc00a6d7d411fa4d076 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 6 Mar 2023 16:07:31 +0100 Subject: [PATCH] Add user_cancelled exception type Signed-off-by: Simon Rozman --- include/stdex/exception.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 include/stdex/exception.h diff --git a/include/stdex/exception.h b/include/stdex/exception.h new file mode 100644 index 000000000..1f487cac6 --- /dev/null +++ b/include/stdex/exception.h @@ -0,0 +1,28 @@ +/* + SPDX-License-Identifier: MIT + Copyright © 2023 Amebis +*/ + +#pragma once + +#include "sal.h" +#include + +namespace stdex +{ + /// + /// User cancelled exception + /// + class user_cancelled : public std::exception + { + public: + /// + /// Constructs an exception + /// + /// \param[in] msg Error message + /// + user_cancelled(_In_opt_z_ const char *msg = nullptr) : exception(msg) + { + } + }; +} \ No newline at end of file