mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-23 01:51:06 +00:00
gstreamer: error: Prefix gst_error_msg with $crate
This macro might not have been imported in the surrounding scope where gst_panic_to_error is used, thus reference it directly by the full namespace.
This commit is contained in:
parent
7f274ebe91
commit
10bc09ba82
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ macro_rules! gst_panic_to_error(
|
|||
#[allow(clippy::unused_unit)]
|
||||
{
|
||||
if $panicked.load(Ordering::Relaxed) {
|
||||
$element.post_error_message(gst_error_msg!($crate::LibraryError::Failed, ["Panicked"]));
|
||||
$element.post_error_message($crate::gst_error_msg!($crate::LibraryError::Failed, ["Panicked"]));
|
||||
$ret
|
||||
} else {
|
||||
let result = panic::catch_unwind(AssertUnwindSafe(|| $code));
|
||||
|
@ -31,11 +31,11 @@ macro_rules! gst_panic_to_error(
|
|||
Err(err) => {
|
||||
$panicked.store(true, Ordering::Relaxed);
|
||||
if let Some(cause) = err.downcast_ref::<&str>() {
|
||||
$element.post_error_message(gst_error_msg!($crate::LibraryError::Failed, ["Panicked: {}", cause]));
|
||||
$element.post_error_message($crate::gst_error_msg!($crate::LibraryError::Failed, ["Panicked: {}", cause]));
|
||||
} else if let Some(cause) = err.downcast_ref::<String>() {
|
||||
$element.post_error_message(gst_error_msg!($crate::LibraryError::Failed, ["Panicked: {}", cause]));
|
||||
$element.post_error_message($crate::gst_error_msg!($crate::LibraryError::Failed, ["Panicked: {}", cause]));
|
||||
} else {
|
||||
$element.post_error_message(gst_error_msg!($crate::LibraryError::Failed, ["Panicked"]));
|
||||
$element.post_error_message($crate::gst_error_msg!($crate::LibraryError::Failed, ["Panicked"]));
|
||||
}
|
||||
$ret
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue