2.11.2

(fix): Change core files to fully qualify references to Attribute and related types in case of name collision.

2.11.1

(fix): When include-exception-handler: true is configured:

  • Remove unneeded CaptureException method from Interceptor class, since there’s already an Intercept method.

2.11.0

(feat): Add constructor exception handling infrastructure for SDK authors to capture initialization errors.

When include-exception-handler: true is configured:

  • Adds CaptureException method to ExceptionHandler class for capturing exceptions without re-throwing
  • Wraps all client constructors (root and sub-clients) with try-catch blocks
  • Initializes clientOptions.ExceptionHandler with a custom interceptor in the root client constructor
  • Generates a {PackageName}ExceptionInterceptor stub class that SDK authors can customize

New configuration option:

  • exception-interceptor-class-name: Custom name for the exception interceptor class (optional)

Example generators.yml configuration:

1groups:
2 dotnet-sdk:
3 generators:
4 - name: fernapi/fern-csharp-sdk
5 version: 2.11.0
6 config:
7 include-exception-handler: true
8 exception-interceptor-class-name: MyCustomExceptionInterceptor

SDK authors can implement their exception capturing logic (e.g., application monitoring platform, logging) in the generated interceptor class.