Skip to content

Commit

Permalink
Fix error-handling for unknown type in asObjectiveCNumberType. (#1152)
Browse files Browse the repository at this point in the history
We were not declaring "error", so ended up throwing an "undeclared variable"
exception, not the actual exception we were trying to throw.
  • Loading branch information
bzbarsky-apple authored Sep 27, 2023
1 parent 62d5aae commit c3ff526
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ function asObjectiveCNumberType(label, type, asLowerCased) {
return 'Float';
case 'double':
return 'Double';
default:
error =
default: {
let error =
label +
': Unhandled underlying type ' +
zclType +
' for original type ' +
type;
throw error;
}
}
})
.then((typeName) =>
Expand Down

0 comments on commit c3ff526

Please sign in to comment.