Skip to content

Commit fb8466f

Browse files
author
李杰
committed
fix kvo remove error message #28
1 parent 4be88e4 commit fb8466f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

JJException.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "JJException"
19-
s.version = "0.1.5"
19+
s.version = "0.1.6"
2020
s.summary = "Handle the objective-c crash exception."
2121

2222
# This description is used to generate tags and improve search results.

JJException/Source/MRC/NSObject+KVOCrash.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ - (void)clearKVOData{
139139
@try {
140140
((void(*)(id,SEL,id,NSString*))objc_msgSend)(self.whichObject,@selector(hookRemoveObserver:forKeyPath:),item.observer,item.keyPath);
141141
}@catch (NSException *exception) {
142-
handleCrashException(JJExceptionGuardKVOCrash,[exception reason]);
143142
}
144143
#pragma clang diagnostic pop
145144
}
@@ -232,7 +231,6 @@ - (void)hookRemoveObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath{
232231
@try {
233232
[self hookRemoveObserver:observer forKeyPath:keyPath];
234233
}@catch (NSException *exception) {
235-
handleCrashException(JJExceptionGuardKVOCrash,[exception reason]);
236234
}
237235
[objectContainer removeKVOObjectItem:item];
238236
}
@@ -253,6 +251,7 @@ - (void)kvo_hookDealloc{
253251
[objectContainer clearKVOData];
254252
}
255253

254+
//Invoke the origin dealloc
256255
[self kvo_hookDealloc];
257256
}
258257

0 commit comments

Comments
 (0)