refactored struct message to use std::variant for _typeOrSeverity

This commit is contained in:
nishant-sachdeva
2022-09-20 19:20:43 +05:30
parent c8011d8719
commit eafd7218b7
12 changed files with 80 additions and 73 deletions
+5 -2
View File
@@ -765,7 +765,10 @@ void CommandLineInterface::compile()
catch (CompilerError const& _exception)
{
m_hasOutput = true;
formatter.printExceptionInformation(_exception, Error::Type::CompilerError);
formatter.printExceptionInformation(
_exception,
Error::errorSeverity(Error::Type::CompilerError)
);
solThrow(CommandLineExecutionError, "");
}
catch (Error const& _error)
@@ -778,7 +781,7 @@ void CommandLineInterface::compile()
else
{
m_hasOutput = true;
formatter.printExceptionInformation(_error, _error.type());
formatter.printExceptionInformation(_error, Error::errorSeverity(_error.type()));
solThrow(CommandLineExecutionError, "");
}
}