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

Method execAndThrowOnError

src/utilities/sql/SqlFile_Impl.cpp:316–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314 }
315
316 void SqlFile_Impl::execAndThrowOnError(const std::string& t_stmt) {
317 char* err = nullptr;
318 if (sqlite3_exec(m_db, t_stmt.c_str(), nullptr, nullptr, &err) != SQLITE_OK) {
319 std::string errstr;
320
321 if (err) {
322 errstr = err;
323 sqlite3_free(err);
324 }
325
326 throw std::runtime_error("Error executing SQL statement: " + t_stmt + " " + errstr);
327 }
328 }
329
330 void SqlFile_Impl::addSimulation(const openstudio::EpwFile& t_epwFile, const openstudio::DateTime& t_simulationTime,
331 const openstudio::Calendar& t_calendar) {

Callers 4

addSimulationMethod · 0.80
insertIlluminanceMapMethod · 0.80
insertTimeSeriesDataMethod · 0.80
execAndThrowOnErrorFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected