Skip to content

Commit

Permalink
Fix CI for exception and verify_message features
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 1, 2021
1 parent dd40809 commit a4b19de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,16 @@ jobs:
echo "LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "CPATH=/usr/local/include:$CPATH" >> $GITHUB_ENV
- name: Build and run tests
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
# TODO: `objc/exception` feature is broken in objc_foundation
# TODO: `objc_foundation/block` feature doesn't work on GNUStep
# TODO: `objc_foundation/block` feature doesn't work
args: --verbose --no-fail-fast --no-default-features

- name: Test w. exception and verify_message features
uses: actions-rs/cargo@v1
with:
command: test
# TODO: `objc_foundation/block` feature doesn't work
args: --verbose --no-fail-fast --no-default-features --features exception,verify_message
3 changes: 2 additions & 1 deletion objc/src/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ use crate::{Encode, EncodeArguments, RefEncode};
macro_rules! objc_try {
($b:block) => {
$crate::exception::catch_exception(|| $b).map_err(|exception| {
use alloc::borrow::ToOwned;
if exception.is_null() {
MessageError("Uncaught exception nil".to_owned())
} else {
MessageError(format!("Uncaught exception {:?}", &**exception))
MessageError(alloc::format!("Uncaught exception {:?}", &**exception))
}
})
};
Expand Down

0 comments on commit a4b19de

Please sign in to comment.