3

Can anyone explain the exception handling in Tizen?

In FAQ i found:

Q: Can I use C++ try-catch exception handling?

A: No, C++ try-catch exception handling is not supported in Tizen.

But in my experiments c++ try catch is working fine when testing on a Tizen Device.

Here is what I did:

  1. Open Tizen SDK
  2. Create an Empty Tizen Native C++ project
  3. In main Put a try catch statement. Put logs in catch and try.

Does this mean that i can use try catch for my methods but not for Tizen APIs and Classes?

Eduard Florinescu
  • 16,747
  • 28
  • 113
  • 179
bikram990
  • 1,085
  • 1
  • 14
  • 36

2 Answers2

5

Does this mean that i can use try catch for my methods but not for Tizen APIs and Classes?

Yes. From the online documentation:

Error handling in Tizen works differently compared to standard C++. Tizen uses error results instead of C++ exceptions, due to historical reasons.
...
The above exception handling model only affects the Tizen platform. When developing your own application, you can use the C++ exception handling mechanism as well. Handle exceptions for your own code with either Tizen exceptions or C++ exceptions.

Michael
  • 57,169
  • 9
  • 80
  • 125
0

this remind me bada design :

error results instead of C++ exceptions, since C++ exceptions require too large of a runtime for resource-constrained devices, and thus incur too much overhead.

source

bikram990
  • 1,085
  • 1
  • 14
  • 36
RzR
  • 3,068
  • 29
  • 26