We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95bce4e commit 3569a1bCopy full SHA for 3569a1b
src/exception.rs
@@ -3,7 +3,7 @@ use objc_exception;
3
use crate::rc::StrongPtr;
4
use crate::runtime::Object;
5
6
-pub unsafe fn r#try<F, R>(closure: F) -> Result<R, StrongPtr>
+pub unsafe fn catch_exception<F, R>(closure: F) -> Result<R, StrongPtr>
7
where F: FnOnce() -> R {
8
objc_exception::r#try(closure).map_err(|exception| {
9
StrongPtr::new(exception as *mut Object)
src/message/mod.rs
@@ -9,7 +9,7 @@ use crate::{Encode, EncodeArguments};
#[cfg(feature = "exception")]
10
macro_rules! objc_try {
11
($b:block) => (
12
- $crate::exception::r#try(|| $b).map_err(|exception|
+ $crate::exception::catch_exception(|| $b).map_err(|exception|
13
if exception.is_null() {
14
MessageError("Uncaught exception nil".to_owned())
15
} else {
0 commit comments