Add user_cancelled exception type
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
515d92b035
commit
be8cffc109
28
include/stdex/exception.h
Normal file
28
include/stdex/exception.h
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/*
|
||||||
|
SPDX-License-Identifier: MIT
|
||||||
|
Copyright © 2023 Amebis
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sal.h"
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user