From 575e6fe3252c2ed96647f4a564ee16edc7d18468 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 7 Jun 2017 19:01:26 +0100 Subject: [PATCH] Remove unneeded unknown_expand exception type --- src/command_manager.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/command_manager.cc b/src/command_manager.cc index fc615078..6ab012d1 100644 --- a/src/command_manager.cc +++ b/src/command_manager.cc @@ -155,12 +155,6 @@ StringView get_until_closing_delimiter(Reader& reader, char opening_delimiter, return reader.substr_from(start); } -struct unknown_expand : parse_error -{ - unknown_expand(StringView name) - : parse_error{format("unknown expand '{}'", name)} {} -}; - template Token::Type token_type(StringView type_name) { @@ -177,7 +171,7 @@ Token::Type token_type(StringView type_name) else if (type_name == "arg") return Token::Type::ArgExpand; else if (throw_on_invalid) - throw unknown_expand{type_name}; + throw parse_error{format("unknown expand '{}'", type_name)}; else return Token::Type::RawQuoted; }