When creating an UIImage with corrupt/incomplete JPEG data, the console will print out
<Error>: Corrupt JPEG data: premature end of data segment
The incomplete image will be shown, with grey filling up the incomplete part. I do not want this to happen.
I desperately tried with a try-catch block but it does catch the error. Is there any way to catch the error?