Skip to content

Commit

Permalink
Better logging when converting unknown NSError to CHIP_ERROR. (#26011)
Browse files Browse the repository at this point in the history
Otherwise we don't know what error we really had.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed May 16, 2024
1 parent 4160d69 commit 1029484
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/darwin/Framework/CHIP/MTRError.mm
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error
}

if (error.domain != MTRErrorDomain) {
ChipLogError(Controller, "Trying to convert non-Matter error %@ to a Matter error code", error);
return CHIP_ERROR_INTERNAL;
}

Expand Down

0 comments on commit 1029484

Please sign in to comment.