Skip to content

Commit 5f26796

Browse files
committed
Report init errors to DuckDB via SetError
Previously, exceptions during extension initialization were silently swallowed. Now the caught exception message is passed to SetError so DuckDB can surface the actual error.
1 parent de2f531 commit 5f26796

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

DuckDB.ExtensionKit.Generators/ExtensionEntryPointGenerator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ public static byte Init(nint info, DuckDBExtensionAccess* access)
125125
Api.duckdb_disconnect(&connection);
126126
return 1;
127127
}}
128-
catch (System.Exception)
128+
catch (System.Exception ex)
129129
{{
130+
SetError(access, info, ex.Message);
130131
return 0;
131132
}}
132133
}}

0 commit comments

Comments
 (0)