MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / execAndThrowOnError

Function execAndThrowOnError

src/utilities/sql/SqlFile_Impl.hpp:1308–1314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1306 // Variadic arguments are the bind arguments if any, to replace '?' placeholders in the statement string
1307 template <typename... Args>
1308 void execAndThrowOnError(const std::string& bindingStatement, Args&&... args) {
1309 if (!m_connectionOpen) {
1310 throw std::runtime_error("Error executing SQL statement as database connection is not open.");
1311 }
1312 PreparedStatement stmt(bindingStatement, m_db, false, args...);
1313 stmt.execAndThrowOnError();
1314 }
1315
1316 void addSimulation(const openstudio::EpwFile& t_epwFile, const openstudio::DateTime& t_simulationTime, const openstudio::Calendar& t_calendar);
1317 int getNextIndex(const std::string& t_tableName, const std::string& t_columnName);

Callers 7

SqlFile_ImplMethod · 0.70
removeIndexesMethod · 0.70
createIndexesMethod · 0.70
addSimulationMethod · 0.70
insertZoneMethod · 0.70
insertIlluminanceMapMethod · 0.70
insertTimeSeriesDataMethod · 0.70

Calls 1

execAndThrowOnErrorMethod · 0.80

Tested by

no test coverage detected