Skip to content

Commit

Permalink
fixup d5bd0c5
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Jan 25, 2024
1 parent 8c3898b commit e6f0e6f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 13 additions & 1 deletion braid-offline/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ pub enum Error {
#[cfg(feature = "backtrace")]
backtrace: Backtrace,
},
#[error("error registering camera: {msg}")]
RegisterCameraError {
msg: &'static str,
#[cfg(feature = "backtrace")]
backtrace: Backtrace,
},
}

fn to_point_info(row: &Data2dDistortedRow, idx: u8) -> NumberedRawUdpPoint {
Expand Down Expand Up @@ -472,7 +478,13 @@ where

orig_camn_to_cam_name.insert(row.camn, orig_cam_name.clone());

cam_manager.register_new_camera(&orig_cam_name, &no_server);
cam_manager
.register_new_camera(&orig_cam_name, &no_server)
.map_err(|msg| Error::RegisterCameraError {
msg,
#[cfg(feature = "backtrace")]
backtrace: std::backtrace::Backtrace::capture(),
})?;
}

{
Expand Down
4 changes: 3 additions & 1 deletion braid-process-video/src/output_braidz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ impl BraidStorage {

for raw_cam_name in all_expected_cameras.iter() {
let no_server = flydra_types::BuiServerInfo::NoServer;
cam_manager.register_new_camera(&raw_cam_name, &no_server);
cam_manager
.register_new_camera(&raw_cam_name, &no_server)
.map_err(|msg| anyhow::anyhow!("Error registering new camera: {msg}"))?;
}

let (frame_data_tx, frame_data_rx) = tokio::sync::mpsc::channel(10);
Expand Down

0 comments on commit e6f0e6f

Please sign in to comment.