Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Mitri <[email protected]>
  • Loading branch information
pet-mit committed Feb 5, 2025
1 parent 4c28b49 commit f05d736
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sonar.sourceEncoding=UTF-8
sonar.exclusions=src/ext/**,\
src/tests/**,\
src/ui/**,\
src/libs/antares/antlr-interface/**
src/expressions/antlr-interface/**

sonar.coverage.exclusions=src/ext/**,\
src/tests/**,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ namespace Antares::Expressions::Visitors
class InvalidNode: public std::invalid_argument
{
public:
explicit InvalidNode(const std::string& node_name = "");
explicit InvalidNode(const std::string& node_name);
};
} // namespace Antares::Expressions::Visitors
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ struct NodeVisitsProvider
{
std::unordered_map<std::type_index, FunctionT> nodeDispatchFunctions;
(
[&nodeDispatchFunctions] {
[&nodeDispatchFunctions]
{
nodeDispatchFunctions[typeid(NodeTypes)] = &tryVisit<R,
NodeVisitor<R, Args...>,
NodeTypes>;
Expand Down Expand Up @@ -106,7 +107,7 @@ class NodeVisitor: public IName
{
if (!node)
{
throw InvalidNode();
throw InvalidNode("null");
}

const static auto nodeVisitList = NodeVisitsProvider<R, Args...>::template NodesVisitList<
Expand Down
2 changes: 1 addition & 1 deletion src/expressions/visitors/InvalidNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Antares::Expressions::Visitors
{

InvalidNode::InvalidNode(const std::string& node_name):
std::invalid_argument("Antares::Expressions::Nodes Visitor: invalid node type " + node_name)
std::invalid_argument("Node visitor encountered an invalid node type: " + node_name)
{
}
} // namespace Antares::Expressions::Visitors

0 comments on commit f05d736

Please sign in to comment.