[go: up one dir, main page]

Page MenuHomePhabricator

Provide a better UX for errors
Open, Needs TriagePublicFeature

Description

Right now, the user experience for errors is below what it should be, especially for user thrown errors. This has lead to an often community practice of simply returning strings for errors which messes it up completely. Below is a list of what I think should be implemented, in order of ascending complexity

  1. The output from throwing an error in JavaScript is different from that in Python. When an error is thrown in Python, the output is a Z500 if you throw a BaseException (likely because of an interesting python quirk), and a Z507 otherwise. In JavaScript, a Z500 is always given.
  2. You cannot see the details of an error in "Try this function.", even if you click the details tab. Ideally, instead of void, the user is shown the actual content of the error; if I throw "input too large" in JavaScript, the end user should immediately see, without clicks, that their input is too large. This would also be helpful for Wikipedia integration. It would be much less confusing to an article reader to see "Rayo's number is approximately equal to Error: input too large" instead of "Rayo's number is approximately equal to void." (though, of course, both are not ideal)
  3. Tests can't detect errors. Error detection is needed for many tests, such as testing that 9*10^100 fails the cardinal function, and that 1/0 throws an error. This could be implemented through a built-in function such as "Is error", which ignores the default error pipeline.

Event Timeline

Feeglgeef renamed this task from Provide a better and cleaner UX for errors to Provide a better UX for errors.Tue, Dec 3, 4:50 AM

It's annoying when a minor error in a string throws a big red message that screams, "there's an error!!!"

It's annoying when a minor error in a string throws a big red message that screams, "there's an error!!!"

It wouldn't be big, it would replace the unhelpful and already indicative of error "void", and tell you what you actually did wrong (at least, better than nothing), instead of leaving you confused, and when you look for more details, seeing an unhelpful "Error in evaluation" and nothing more.