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

fix error reporting when printing void

parent bfaa0e0e
No related branches found
No related tags found
2 merge requests!133Merge unordered automata and fixes,!131Backlog changes
......@@ -20,6 +20,9 @@ public:
CommandResult run ( Environment & environment ) const override {
std::shared_ptr < abstraction::Value > value = m_expr->translateAndEval ( environment );
 
if ( value->getType ( ) == std::string ( ext::to_string < void > ( ) ) )
throw std::invalid_argument ( "Printing void is not allowed." );
std::shared_ptr < abstraction::OperationAbstraction > res = abstraction::Registry::getValuePrinterAbstraction ( value->getType ( ) );
 
res->attachInput ( value, 0 );
......
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