-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Json Schema: Stop throwing errors for user errors (#2685)
fix [#2535](#2535) Converted most of the `throw error` to either: - `compileAssert` if it is somethign that shouldn't happen - `reportDiagnositc` if this is something actionable by the user There is still 2 `throw error` as I'm not sure if those are things that could happen or not. I'll leave them until someone maybe gets a crash and we can then convert. --------- Co-authored-by: Mark Cowlishaw <[email protected]>
- Loading branch information
1 parent
d2e72f6
commit 2ca9cbe
Showing
5 changed files
with
101 additions
and
49 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
common/changes/@typespec/json-schema/json-schema-no-throw_2023-11-21-16-21.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@typespec/json-schema", | ||
"comment": "Report diagnostic instead of throwing errors in the case of duplicate ids or unknown scalar", | ||
"type": "none" | ||
} | ||
], | ||
"packageName": "@typespec/json-schema" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters