Guest User

Untitled

a guest
Oct 23rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. externalNativeBuild {
  2. cmake {
  3. cppFlags "-frtti -fexceptions -pthread -v -std=c++11"
  4. arguments '-DANDROID_PLATFORM=android-9', '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_shared'
  5. }
  6. }
  7. ndk {
  8. abiFilters 'armeabi'
  9. }
  10.  
  11. unw_get_reg
  12. _Unwind_VRS_Interpret
  13. __gnu_Unwind_RaiseException
  14. ___Unwind_RaiseException
  15. __cxxabiv1::__cxa_throw(void *, std::type_info *, void (*)(void *))
  16. throw std::exception();
  17.  
  18. #include <exception>
  19. #include <android/log.h>
  20.  
  21. void testTryCatch() {
  22. try {
  23. throw std::exception();
  24. }catch(std::exception &e){
  25. __android_log_write(ANDROID_LOG_INFO, "testException", "done");
  26. }
  27. }
  28.  
  29. JNIEXPORT void JNICALL
  30. Java_de_company_project_wrapper_SystemWrapper_startApplication(JNIEnv *env,
  31. jclass obj)
  32. {
  33. testTryCatch();
  34. }
Add Comment
Please, Sign In to add comment