You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 766ba08
Browse filesBrowse the repository at this point in the historyBrowse files
add support for plumbing through some errors for go (#1844)
<!-- ELLIPSIS_HIDDEN -->
> [!IMPORTANT]
> Add error handling support to the Go client for BAML runtime by
implementing error callbacks and updating integration tests.
>
> - **Error Handling**:
> - Added `env_logger` dependency in `Cargo.lock` and `Cargo.toml` for
logging support.
> - Implemented `error_callback` in `callbacks.go` to handle errors from
Rust and send them to Go callbacks.
> - Updated `register_callbacks()` in `lib.rs` to initialize
`env_logger` and set error callback.
> - Modified `safe_trigger_callback()` in `lib.rs` to use
`ERROR_CALLBACK_FN` for error handling.
> - **Integration Tests**:
> - Updated `Makefile.toml` to set `BAML_LIBRARY_PATH` for integration
tests.
> - Modified `test.go` to use string parameters directly instead of
`types.Union__List__string__string{}`.
> - **Misc**:
> - Updated `runtime.go` to register `error_callback` during
initialization.
> - Added `github.com/google/flatbuffers` to `go.mod` in
`integ-tests/go`.
> - Minor logging and error handling improvements in `callbacks.go` and
`runtime.go`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for 070c4cd. You can
[customize](https://app.ellipsis.dev/BoundaryML/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
0 commit comments