Skip to content
Snippets Groups Projects
Commit 8222024c authored by Jan Trávníček's avatar Jan Trávníček
Browse files

some user experience improvements in alib2str

parent 1a92e7f1
No related branches found
No related tags found
No related merge requests found
......@@ -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" } } );
}
};
 
......
......@@ -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 ( );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment