catch performSegue(withIdentifier)

performSegue(withIdentifier) documentation says “This method throws an Exception handling …” (sic)

yet the function is not marked as “throws”.


I know for a fact that it causes an exception in some cases.


I try to put it in a do/try/catch block and Xcode tells me

“No calls to throwing functions occur within the ‘try’ expression” and

“‘Catch’ block is unreachable because no errors are thrown in the ‘do’ block”


How do I trap this exception? Thanks.

Powered by WPeMatico

You may also like...

Comments are closed.