Can someone tell me what "XThrowIfError" does?

I can not find its definition in the documentation ...

+3
source share
2 answers

This is a macro defined in the Apple iPublicUtility classes, included in several of its sample code packages, such as SpeakHere. In particular, this is in the header of CAXException.h.

When called, XThrowIfError(error, operation)it essentially throws CAXException()if it erroris nonzero.

+7
source

I had a search and using it in code this page is in the archive of the Apple mailing list. I would say that this calls the method that you specify as the first argument and throws an exception if it returns an error.

.

0

Source: https://habr.com/ru/post/1765143/


All Articles