Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error mesages for vidyut.cheda #2

Closed
akprasad opened this issue Jan 21, 2023 · 3 comments
Closed

Improve error mesages for vidyut.cheda #2

akprasad opened this issue Jan 21, 2023 · 3 comments

Comments

@akprasad
Copy link
Contributor

If the vidyut_cheda crate fails, our vidyut.cheda wrapper passes through the raw Rust error and doesn't give much insight on how to correct the error.

This is poor UX. In addition to improving the upstream error messages, we should provide informative messages here.

Errors to test:

  • sandhi file not found
  • sandhi file invalid
  • kosha files not found
  • kosha files invalid
  • model files not found
  • model files invalid
@vipranarayan14
Copy link

Also, it throws the error "index out of bounds: the len is 256 but the index is 2947" when the input text is not in SLP1 (ASCII?).
The error msg has to be improved. Otherwise, it isn't easy to understand what's going on. I, for instance, thought there was something wrong with the code. And the word "Panic" in the error msg causes real panic 😂!

@akprasad
Copy link
Contributor Author

I'm working on this now along with #3 and #4.

@akprasad
Copy link
Contributor Author

Fixed by adding better pass-through for Rust errors. I also added an error condition for non-ASCII input, for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants