mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 04:51:09 +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
5a28412fef
commit
787954eab9
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ macro_rules! gst_panic_to_error(
|
||||||
#[allow(clippy::unused_unit)]
|
#[allow(clippy::unused_unit)]
|
||||||
{
|
{
|
||||||
if $panicked.load(Ordering::Relaxed) {
|
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
|
$ret
|
||||||
} else {
|
} else {
|
||||||
let result = panic::catch_unwind(AssertUnwindSafe(|| $code));
|
let result = panic::catch_unwind(AssertUnwindSafe(|| $code));
|
||||||
|
@ -31,11 +31,11 @@ macro_rules! gst_panic_to_error(
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
$panicked.store(true, Ordering::Relaxed);
|
$panicked.store(true, Ordering::Relaxed);
|
||||||
if let Some(cause) = err.downcast_ref::<&str>() {
|
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>() {
|
} 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 {
|
} 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
|
$ret
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue