O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Throwing exceptions from native code

Error handling in the Store project is not really satisfying. If the requested key cannot be found or if the retrieved value type does not match the requested type, a default value is returned. We definitely need a way to indicate an error happened! And what better (note that I do not say faster...) to indicate an error than an exception?

Throwing exceptions from native code

Tip

Project Store_Part3-2 can be used as a starting point for this part. The resulting project is provided with this book under the name Store_Part3-3.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required