mac testing ccall inside try catch