From 1cccad3dd24e4a5cf5d7299326ae302e71980971 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Sat, 5 Oct 2019 13:27:55 +0200 Subject: replace throw with abort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is nothing catching the exception anyway, and this fails to compile if compiling the plugin with Clang's CXXFLAGS (which include -fno-exceptions). Change-Id: Iad9316ad9613e4fd66d0e5a16fd71bbb8066cc2b Reviewed-on: https://gerrit.libreoffice.org/80299 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Luboš Luňák --- compilerplugins/clang/flatten.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'compilerplugins') diff --git a/compilerplugins/clang/flatten.cxx b/compilerplugins/clang/flatten.cxx index e56d21603774..81f897cb0ee3 100644 --- a/compilerplugins/clang/flatten.cxx +++ b/compilerplugins/clang/flatten.cxx @@ -474,7 +474,10 @@ std::string stripOpenAndCloseBrace(std::string s) { size_t i = s.find("{"); if (i == std::string::npos) - throw "did not find {"; + { + assert( !"did not find {" ); + abort(); + } ++i; // strip to line end @@ -486,7 +489,10 @@ std::string stripOpenAndCloseBrace(std::string s) i = s.rfind("}"); if (i == std::string::npos) - throw "did not find }"; + { + assert( !"did not find }" ); + abort(); + } --i; while (s[i] == ' ') --i; -- cgit