Test if UIGraphicsGetImageFromCurrentImageContext has succedded, or failed due to insufficient memory

Is there any way to tell, in code, if UIGraphicsGetImageFromCurrentImageContext has failed?

I am seeing: "CGBitmapContextInfoCreate: unable to allocate 1112756160 bytes for bitmap data" regularly in the console but the execution of the code carries on regardless.

How can I detect this failure from in code?

Test if UIGraphicsGetImageFromCurrentImageContext has succedded, or failed due to insufficient memory
 
 
Q