Links to docs from error messages #1787
mtoy-googly-moogly
started this conversation in
General
Replies: 1 comment 5 replies
-
I think I will go this way ... the error message data structure will have a link field, but the utility functions in the compiler which generate error messages will parse out the |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
An error message might look like
`Aggregate source cannot be a ${footType.dataType}`
We would like it to show up to a user as
Then clicking on the link the user is taken to a line in a file
Aggregate source cannot be a datatype
The path to an aggregate computation (e.g.
alpha.beta.sum()
) was specified and, except for the final entry in the path, each component must be a join or a record. See Aggregates for more information.I propose making a single file which contains all the error explanations, "error_dictionary.malloynb"
for the text for the above message ....
Which would generate the link. (automatically the way that docs are processed)
Would appear in that file, and then code which generates the error would be
This doesn't require any extra infrastructure to support redirection to errors, makes it easy to add errors.
Embedding the link in the error message is a laziness, should probably require extra arguments for the error logging so the link is an explicit piece of meta data, I'll look at the best API once I stat implementing it
Anyway the Extension would then have the data to show a link with an error message, no idea (yet) if there is a way for that to show up in the Problems window.
Beta Was this translation helpful? Give feedback.
All reactions