From b45917e3e5a4d1a7d88bbeabde69bc3b5a493cb4 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Wed, 22 Nov 2017 16:55:48 -0500 Subject: [PATCH] Dropping ERROR in simple printout --- include/CLI/App.hpp | 2 +- tests/HelpTest.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/CLI/App.hpp b/include/CLI/App.hpp index cd8a6320..9bf3f5c6 100644 --- a/include/CLI/App.hpp +++ b/include/CLI/App.hpp @@ -1507,7 +1507,7 @@ class App { namespace FailureMessage { inline std::string simple(const App *app, const Error &e) { - std::string header = std::string("ERROR: ") + e.what() + "\n"; + std::string header = e.what() + "\n"; if(app->get_help_ptr() != nullptr) header += "Run with " + app->get_help_ptr()->single_name() + " for more information.\n"; return header; diff --git a/tests/HelpTest.cpp b/tests/HelpTest.cpp index 9a2bb995..6c56e786 100644 --- a/tests/HelpTest.cpp +++ b/tests/HelpTest.cpp @@ -435,7 +435,7 @@ TEST_F(CapturedHelp, NormalError) { EXPECT_EQ(run(CLI::ExtrasError("Thing")), static_cast(CLI::ExitCodes::Extras)); EXPECT_EQ(out.str(), ""); EXPECT_THAT(err.str(), HasSubstr("for more information")); - EXPECT_THAT(err.str(), HasSubstr("ERROR: ExtrasError")); + EXPECT_THAT(err.str(), HasSubstr("ExtrasError")); EXPECT_THAT(err.str(), HasSubstr("Thing")); EXPECT_THAT(err.str(), Not(HasSubstr("Usage"))); }