Skip to content

Conversation

taniabogatsch
Copy link
Contributor

New C API functionality:

typedef struct _duckdb_error_data {
	void *internal_ptr;
} * duckdb_error_data;
DUCKDB_C_API duckdb_error_data duckdb_create_error_data(duckdb_error_type type, const char *message);
DUCKDB_C_API void duckdb_destroy_error_data(duckdb_error_data *error_data);
DUCKDB_C_API duckdb_error_type duckdb_error_data_error_type(duckdb_error_data error_data);
DUCKDB_C_API const char *duckdb_error_data_message(duckdb_error_data error_data);
DUCKDB_C_API bool duckdb_error_data_has_error(duckdb_error_data error_data);

The PR also includes some tidying up of the C API (helper) functions.

@Giorgi
Copy link
Contributor

Giorgi commented May 30, 2025

Thanks for working on this @taniabogatsch! For the sake of consistency, will you also deprecate duckdb_result_error_type and duckdb_result_error and add duckdb_result_error_data?

@taniabogatsch
Copy link
Contributor Author

@Giorgi - yes, eventually that's the plan.

@duckdb-draftbot duckdb-draftbot marked this pull request as draft June 2, 2025 10:47
@taniabogatsch taniabogatsch marked this pull request as ready for review June 2, 2025 10:48
@taniabogatsch
Copy link
Contributor Author

I don't think (?) the CI failures are related - they are all five the same build failure looking like this:

https://github.com/duckdb/duckdb/actions/runs/15390337643/job/43298119166?pr=17722#step:3:7949

/duckdb_build_dir/build/release/_deps/httpfs_extension_fc-src/extension/httpfs/include/crypto.hpp:32:14: error: ‘void duckdb::AESStateSSL::InitializeEncryption(duckdb::const_data_ptr_t, duckdb::idx_t, const std::string*)’ marked ‘override’, but does not override
   32 |         void InitializeEncryption(const_data_ptr_t iv, idx_t iv_len, const std::string *key) override;
      |              ^~~~~~~~~~~~~~~~~~~~
/duckdb_build_dir/build/release/_deps/httpfs_extension_fc-src/extension/httpfs/include/crypto.hpp:33:14: error: ‘void duckdb::AESStateSSL::InitializeDecryption(duckdb::const_data_ptr_t, duckdb::idx_t, const std::string*)’ marked ‘override’, but does not override
   33 |         void InitializeDecryption(const_data_ptr_t iv, idx_t iv_len, const std::string *key) override;

@samansmink
Copy link
Contributor

I'll take a look at the httpfs thing

@samansmink
Copy link
Contributor

fyi, PR up for CI here #17755

@Mytherin Mytherin merged commit 12183c4 into duckdb:main Jun 3, 2025
46 of 51 checks passed
@Mytherin
Copy link
Collaborator

Mytherin commented Jun 3, 2025

Thanks!

@taniabogatsch taniabogatsch deleted the c-api branch June 3, 2025 10:25
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Jun 5, 2025
[CAPI] Expose ErrorData (duckdb/duckdb#17722)
Rename decorator from test_nulls to null_test_parameters (duckdb/duckdb#17760)
re-add httpfs apply_patches (duckdb/duckdb#17755)
Deprecate windows-2019 runners  (duckdb/duckdb#17745)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Jun 5, 2025
[CAPI] Expose ErrorData (duckdb/duckdb#17722)
Rename decorator from test_nulls to null_test_parameters (duckdb/duckdb#17760)
re-add httpfs apply_patches (duckdb/duckdb#17755)
Deprecate windows-2019 runners  (duckdb/duckdb#17745)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants