How to try catch CC_ASSERT exception?

I want to know how can I catch exception for CC_ASSERT.
Thanks.

Asserts work by throwing an error when a condition is not met. You can just do it by creating an IF branch.

// Using assert
CC_ASSERT( sprite != NULL, "Sprite is NULL!" );

// Using IF
if ( sprite == NULL ) {
   CCLOG( "ERROR: sprite object 0x%x is NULL!", sprite );

   // Terminate app here
}