From 8222024c81965294bea53fb56de99f65b7b93751 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Thu, 18 Jan 2018 21:18:46 +0100 Subject: [PATCH] some user experience improvements in alib2str --- alib2str/src/registration/StringRegistration.hpp | 4 ++-- alib2str/src/registry/StringReaderRegistry.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alib2str/src/registration/StringRegistration.hpp b/alib2str/src/registration/StringRegistration.hpp index 1c6f169078..99523627ac 100644 --- a/alib2str/src/registration/StringRegistration.hpp +++ b/alib2str/src/registration/StringRegistration.hpp @@ -39,7 +39,7 @@ public: core::stringApi < Group >::template registerStringReader < Type > ( ); abstraction::StringReaderRegistry::registerStringReader < Group, Type > ( ); - abstraction::AlgorithmRegistry::registerWrapper < string::Parse < Group >, std::string && > ( string::Parse < Group >::abstractionFromString, std::array < std::string, 1 > { } ); + abstraction::AlgorithmRegistry::registerWrapper < string::Parse < Group >, std::string && > ( string::Parse < Group >::abstractionFromString, std::array < std::string, 1 > { { "arg0" } } ); } }; @@ -50,7 +50,7 @@ public: core::stringApi < Group >::template registerStringWriter < Type > ( ); abstraction::StringWriterRegistry::registerStringWriter < Type > ( ); - abstraction::AlgorithmRegistry::registerWrapper < string::Compose, const Type & > ( string::Compose::abstractionFromType, std::array < std::string, 1 > { } ); + abstraction::AlgorithmRegistry::registerWrapper < string::Compose, const Type & > ( string::Compose::abstractionFromType, std::array < std::string, 1 > { { "arg0" } } ); } }; diff --git a/alib2str/src/registry/StringReaderRegistry.cpp b/alib2str/src/registry/StringReaderRegistry.cpp index 6d2d6bbe70..710f131a52 100644 --- a/alib2str/src/registry/StringReaderRegistry.cpp +++ b/alib2str/src/registry/StringReaderRegistry.cpp @@ -19,7 +19,7 @@ std::shared_ptr < abstraction::OperationAbstraction > StringReaderRegistry::getA const auto & entries = getEntries ( ) [ group ]; typename ext::deque < std::pair < std::function < bool ( std::istream & ) >, std::unique_ptr < Entry > > >::const_iterator callback = find_if ( entries.begin ( ), entries.end ( ), lambda ); if ( callback == entries.end ( ) ) - throw exception::CommonException ( "Entry not available." ); + throw exception::CommonException ( "Entry " + group + " not available." ); return callback->second->getAbstraction ( ); } -- GitLab