Skip to content

Commit

Permalink
Merge pull request #470 from tienvx/add-error-handling
Browse files Browse the repository at this point in the history
docs: Add error handling
  • Loading branch information
rholshausen authored Oct 27, 2024
2 parents 1bccbc2 + 70bf2d9 commit a85d9e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rust/pact_ffi/src/log/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ pub unsafe extern "C" fn pactffi_logger_attach_sink(
///
/// This function will install a global tracing subscriber. Any attempts to modify the logger
/// after the call to `logger_apply` will fail.
///
/// # Error Handling
///
/// The return error codes are as follows:
///
/// - `-1`: Can't set logger (applying the logger failed, perhaps because one is applied already).
#[no_mangle]
pub extern "C" fn pactffi_logger_apply() -> c_int {
let status = match apply_logger() {
Expand Down

0 comments on commit a85d9e0

Please sign in to comment.