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 Jun 30, 2023
1 parent 44168bf commit d3815cd
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 d3815cd

Please sign in to comment.