Throw an exception when calling the removeObserver:forKeyPath:context: method

This commit is contained in:
Gregory John Casamento 2023-09-14 12:22:56 -04:00
parent 5507ea1d1e
commit b8bc924cdb

View file

@ -1566,7 +1566,9 @@ cifframe_callback(ffi_cif *cif, void *retp, void **args, void *user)
forKeyPath: (NSString*)aPath
context: (void*)context
{
[self removeObserver: anObserver forKeyPath: aPath];
[NSException raise: NSGenericException
format: @"[%@-%@]: This class is not observable",
NSStringFromClass([self class]), NSStringFromSelector(_cmd)];
}
@end