@@ -591,7 +591,7 @@ bool osp_config_parser::parse_boolean_value(const std::string& s)
591
591
iss.clear ();
592
592
iss >> std::boolalpha >> bool_value;
593
593
if (iss.fail ()) {
594
- throw std::invalid_argument (" Value: '" + s + " ' is not convertable to bool" );
594
+ throw std::runtime_error (" Value: '" + s + " ' is not convertable to bool" );
595
595
}
596
596
}
597
597
@@ -675,7 +675,7 @@ osp_config_parser::SignalConnection find_signal_connection(
675
675
if (it == signalConnections.end ()) {
676
676
std::ostringstream oss;
677
677
oss << " Missing expected connection to " << functionName << " :" << signalName;
678
- throw std::out_of_range (oss.str ());
678
+ throw std::runtime_error (oss.str ());
679
679
}
680
680
return *it;
681
681
}
@@ -713,7 +713,7 @@ extended_model_description get_emd(
713
713
if (emdIt == emds.end ()) {
714
714
std::ostringstream oss;
715
715
oss << " Cannot find extended model description for " << element;
716
- throw std::out_of_range (oss.str ());
716
+ throw std::runtime_error (oss.str ());
717
717
}
718
718
return emdIt->second ;
719
719
}
@@ -939,14 +939,14 @@ osp_config load_osp_config(
939
939
std::ostringstream oss;
940
940
oss << " Configured base step size [" << simInfo.stepSize << " ] must be nonzero and positive" ;
941
941
BOOST_LOG_SEV (log::logger (), log::error) << oss.str ();
942
- throw std::invalid_argument (oss.str ());
942
+ throw std::runtime_error (oss.str ());
943
943
}
944
944
945
945
if (simInfo.endTime .has_value () && simInfo.startTime > simInfo.endTime .value ()) {
946
946
std::ostringstream oss;
947
947
oss << " Configured start time [" << simInfo.startTime << " ] is larger than configured end time [" << simInfo.endTime .value () << " ]" ;
948
948
BOOST_LOG_SEV (log::logger (), log::error) << oss.str ();
949
- throw std::invalid_argument (oss.str ());
949
+ throw std::runtime_error (oss.str ());
950
950
}
951
951
952
952
osp_config config;
0 commit comments