NodeModularStructureBuilder::NodeSetT const&
NodeModularStructureBuilder::GetSimilarNodesAtLevel ( Node const* p_node,
size_t level )
{
if ( p_node ) {
string s_name = StructuralAnalysis::Util::GetNLevelModularName (
p_node, level );
return this->node_ms_map_[s_name]; // this return is fine...
}
// if p_node is NULL then throw exception
throw Except::NullPointerCrash ( "Invalid node pointer passed to "
"FlopModularStructureBuilder::GetSimilarNodesAtLevel "
"output is not usable." );
// return ??????????
}
Q1。为了避免编译器错误,我们需要从上面的函数中返回一些东西。我们应该返回什么?或者建议我如何处理返回引用的成员函数的返回值(在异常上)?
Q2。程序执行会碰到这个返回语句吗?