Render error message (not pointer) (#28797)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
aceecec6bf
commit
6267a147ba
1 changed files with 6 additions and 1 deletions
|
@ -27,6 +27,8 @@ use objc::{
|
|||
};
|
||||
use std::{cell::RefCell, ffi::c_void, mem, ptr, rc::Rc};
|
||||
|
||||
use super::NSStringExt;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct MacScreenCaptureSource {
|
||||
sc_display: id,
|
||||
|
@ -184,7 +186,10 @@ pub(crate) fn get_sources() -> oneshot::Receiver<Result<Vec<Box<dyn ScreenCaptur
|
|||
Ok(result)
|
||||
} else {
|
||||
let msg: id = msg_send![error, localizedDescription];
|
||||
Err(anyhow!("Failed to register: {:?}", msg))
|
||||
Err(anyhow!(
|
||||
"Screen share failed: {:?}",
|
||||
NSStringExt::to_str(&msg)
|
||||
))
|
||||
};
|
||||
tx.send(result).ok();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue