probcomp / iventure

An interactive, browser-based probabilistic programming environment.
Apache License 2.0
14 stars 2 forks source link

Capture daunting BQLError stack traces and report one-line error messages. #55

Closed fsaad closed 7 years ago

fsaad commented 7 years ago

The mechanism should capture the full traceback and allow the user view if it if necessary.

In particular, some error messages such as Population already exists are fine to just summarize using a 1 line error message to stderr. However, for stack traces arising frmo genuine software bugs or failures of internal checks in bayeslite/cgp, 1 line error message will be extremely confusing the user (imagine seeing _serialize_venturescript() takes exactly 7 arguments, 4 given pop in as an answer to a BQL query). The tb recovery mechanism can help in these situations.

curlette commented 7 years ago

+1 to this request. It is very much in line with product goals and improving the user experience.

riastradh-probcomp commented 7 years ago

Errors like _serialize_venturescript() takes exactly 7 arguments, 4 given won't be BQLError.

fsaad commented 7 years ago

The fix that I applied doesn't care about BQLError, etc, it just captures any exception, writes a one-line message to sderr, and stores the full stack trace in the log file.