-
Notifications
You must be signed in to change notification settings - Fork 1
refactor(all)!: add more details to errors #87
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
Conversation
2728f30 to
075404a
Compare
Add FsIoError, which consolidates all filesystem I/O errors and includes relevant context where possible. It is included in every error type that needs to represent filesystem errors. Also add relevant details to every error type in core. Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
…ropriate Fixes warnings of Java build and test. Use non-deprecated methods of pyo3. More safety for Java exceptions: use an enum to list all possible exceptions. Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
3a68de1 to
cccbb0b
Compare
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
…se the variant is only constructed in one place from String Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
|
Is it worth putting more work into addressing #33? Our sysml parser/lexer is rudimentary, so it will not produce semantically meaningful error messages, just basic parse errors. Also it is kind of half automatic, half manual, which makes it much harder to include meaningful error context, as that context has to travel through 5+ functions and thus should be refected in all their signatures... |
Let's not put a lot of effort into this right now, since we are not even sure for how long we will keep this lexer implementation. I think it might be worth to hack something that at least displays some basic context indicating where the error occurred though. |
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
|
|
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
tilowiklundSensmetry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! There are still some ergonomics issues with error reporting from the actual CLI, but I think those are better treated one (sub)command at a time.
Signed-off-by: Andrius Pukšta <andrius.puksta@sensmetry.com>
Core
FsIoError, which consolidates all filesystem I/O errors and includes relevant context. It is included in every error type that needs to represent filesystem errors.mod wrapfsthat wrapsstd's I/O methods that we use and adds relevant context automatically#![allow(unused_imports)]) to silence warnings. These imports are used by different features and it's not worth it figuring out where exactly they are used.Java bindings
enum ExceptionKindthat lists all possible Sysand exceptions and use it instead of providing string names for exceptions. Fixed one case of nonexistent exception name.pom.xml.&mut envon each call, implement a trait onenvdirectlyPython bindings
WASM bindings
localStorageon start of one test (the test uses less storage slots than the other one, and so entries form the other test are still visible). Maybe should clearlocalStorageat the end of every test?