Results of 1 - 1 of about 1 for GetError (0.000 sec.)
- C++ API 9414
- Installation To use the DuckDB C++ API, download the libduckdb archive for your platform. The latest stable version of the DuckDB C++ API is 2.0.0. Warning DuckDB's C++ API is internal. It is not guaranteed to be stable and can change witho
...(3, 4), (5, 6), (7, NULL)"); auto result = con.Query("SELECT * FROM integers"); if (result->HasError()) { cerr << result->GetError() << endl; } else { cout << result->ToString() << endl; } Query will not throw exceptions under normal circumstances. Inst...cause the HasError() method of the returned QueryResult to return true . In this case, the error message is available via GetError() . The methods GetErrorType() and GetErrorObject() are also available for any QueryResult instance which may aid in more...andling. auto result = con.Query("INSERT INTO integers VALUES (1, 2)"); if (result->HasError()) { auto errorType = result->GetErrorType(); switch (errorType) { case duckdb::ExceptionType::CONSTRAINT: { // Example handling auto errorObject = result->GetEr... - https://man.mtool.work/duckdb/2.0/clients/cpp.html
PREV
1
NEXT
DuckDB 2.0 Documentation / man.mtool.work