Languages

Menu
Sites
Language
Can't catch exception if application launched by Tizen Dynamic Analyzer.

My application base a c++ module, in the c++ moudle, have follow instructions:

// MyModule.cpp

int some_function(){
  throw int(-1);
  return 0;
}

void main_function(){
  try{
    int ret = some_function();
  }
  catch(int e){
    dlog_print(DLOG_DEBUG, "Hello", "Ok, the int exception catched.");
  }
  catch(...){
    dlog_pring(DLOG_DEBUG, "Hello", "Ok, the other exception catched.");
  }
}

The try catch instructions works ok on emulator if launched by Tizen IDE.

But the application should crash if launched by Tizen Dynamic Analyzer.

It seems that try catch instruction doesn't work correctly.

What the matter?

Thanks
 

Responses

6 Replies
Jean Yang

Hi, 

Which version of SDK you used? As I know the 2.3.0 SDK seems is available for C , I didn't see the help doc of C++ in 2.3.0

roc john

I used the latest version 2.3.0 rev2 SDK.

The problem is:

  The try catch mechnism worked correctly when app was launched by click "Debug" button of IDE.

  But this mechnism can't work if app was launched by click "Profile" button of IDE.

eason chan

Hi John,

How can you make and build your C++ code in Tizen IDE? I can't find any template of C++ in the Tizen IDE and can make a shared lib with C.

Eason,

Alex Dem

Hi,
just fyi, simple way:
Just create any app (Template ->UI Application->Basic UI Apllication) and rename C to CPP. It  should be compiled with C++ compiler automatically.
Note: You will need cast appdata pointer this way:

    appdata_s *ad;
    ad = static_cast<appdata_s *>(data);

Alexey.

Alex Dem

Hi,
I have checked with my device and I have got the same, but I have no expertise to exaplain why it is crashed with Dynamic analyzer.
If the app is launched another way it is ok.
fyi, if I throw such exception from 'try' the app is not crashed even with Dynamic Analyzer:

  try{
    throw int(-1);
   }

Alexey.

roc john

Thank you! Alex~