Skip to content

Commit

Permalink
Log what sort of object we have if it's not the right sort of object. (
Browse files Browse the repository at this point in the history
…#37573)

Otherwise it's hard to tell what might be going wrong.
  • Loading branch information
bzbarsky-apple authored Feb 14, 2025
1 parent b1c3091 commit c075fcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/darwin/Framework/CHIP/MTRDevice_XPC.mm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ - (BOOL)_internalState:(NSDictionary *)dictionary hasValidValuesForKeys:(const N
continue;
}
if (!MTR_SAFE_CAST(value, NSNumber) && !MTR_SAFE_CAST(value, NSDate)) {
MTR_LOG_ERROR("%@ device:internalStateUpdated: handed state with invalid value for \"%@\": %@", self, key, value);
MTR_LOG_ERROR("%@ device:internalStateUpdated: handed state with invalid value of type %@ for \"%@\": %@", self,
NSStringFromClass([value class]), key, value);
return NO;
}
}
Expand Down

0 comments on commit c075fcc

Please sign in to comment.