From cfa658b899b44a8a0f4c7f3dd9811ae0d44ddd3a Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 15 May 2023 21:10:02 +1000 Subject: Add to cancel current operation The current implementation only does this during regex operations, but should be extensible to other operations that might take a long time by regularly calling EventManager::handle_urgent_events(). --- src/exception.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/exception.hh') diff --git a/src/exception.hh b/src/exception.hh index 0ff3d825..28f41029 100644 --- a/src/exception.hh +++ b/src/exception.hh @@ -29,6 +29,11 @@ struct failure : runtime_error using runtime_error::runtime_error; }; +struct cancel : runtime_error +{ + cancel() : runtime_error("cancellation requested") {} +}; + struct logic_error : exception { }; -- cgit v1.2.3