You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are moving fast, but our tools lack well-designed error messages. Unlike any formal compiler, which provides clear error codes and messages to help developers identify and resolve issues efficiently, we only throw exceptions with lengthy call stack information, which is very user-unfriendly.
Designing an effective error message sub-system is crucial for enhancing user experience and minimizing frustration.
The error message from our tool should be:
Clear and Unambiguous Messages: Ensure that error messages are simple, easy to understand, and contextually relevant. Avoid technical jargon that might confuse users.
Strategic Placement: Position error messages near the relevant field to make it easier for users to identify and correct the issue.
Provide Solutions: Good error messages not only highlight the problem but also offer solutions.
Avoid Blaming the User: Frame error messages in a way that doesn't place blame on the user. For example, instead of saying "You did not specify the format of the property XXX," use "Please specify the form of the property XXX".
The content you are editing has changed. Please copy your edits and refresh the page.
@ArthurMa1978: Why is this here and not in the TypeSpec repo? Has this gone through the triage process and been discussed with the generator leads?
ArthurMa1978
changed the title
Design and implement an effective error message sub-system for our .Net code generation tool
Design and implement an effective error message sub-system for our code generation tool
Jan 14, 2025
@ArthurMa1978: Why is this here and not in the TypeSpec repo? Has this gone through the triage process and been discussed with the generator leads?
This initiative encompasses general code generation, including both TypeSpec and Swagger.
Designing a good error message sub-system is a significant undertaking that requires huge effort. This project is not limited to C# but extends to all the languages we support. Therefore, we will draft a design and conduct reviews and discussions across all languages.
We are moving fast, but our tools lack well-designed error messages. Unlike any formal compiler, which provides clear error codes and messages to help developers identify and resolve issues efficiently, we only throw exceptions with lengthy call stack information, which is very user-unfriendly.
Designing an effective error message sub-system is crucial for enhancing user experience and minimizing frustration.
The error message from our tool should be:
Features
Related tasks
Update generator version in Azure SDK repo
not stop when error happens autorest.csharp#2913The text was updated successfully, but these errors were encountered: