Sorry, I'm a newbie, so the questions may seem silly:
How do I know if a function can return an exception?
(I couldn't find anything about it in the documentation)
If there can be no exceptions, then what happens if I pass invalid data to a function or if the operating system does not have enough resources to allocate memory for a new object?
For example, here is a part of the code:
1) Can the CFRunLoopAddSource function return an exception?
2) How do I understand that the CFRunLoopAddSource function did not have enough memory to add new data? (and in general, how to find out about any other problems)
How do I know if a function can return an exception?
(I couldn't find anything about it in the documentation)
If there can be no exceptions, then what happens if I pass invalid data to a function or if the operating system does not have enough resources to allocate memory for a new object?
For example, here is a part of the code:
Code Block C++ runLoopMachPort = CFMachPortCreateRunLoopSource( kCFAllocatorDefault, eventTab, 0); CFRunLoopAddSource( CFRunLoopGetCurrent(), runLoopMachPort, kCFRunLoopCommonModes);
1) Can the CFRunLoopAddSource function return an exception?
2) How do I understand that the CFRunLoopAddSource function did not have enough memory to add new data? (and in general, how to find out about any other problems)