-
-
Notifications
You must be signed in to change notification settings - Fork 748
Improve errors and error handling #460
Comments
If there are any questions, I'll gladly assist you! |
What about logging? |
We also need logging, should be a separate issue though. |
I'd suggest to use |
YES! |
So I'm working on better error handling in the assets crate now. |
I solved the harder part of this in #464 which introduces much better errors for asset handling. What is left are easier jobs for the other crates:
All this crates would benefit from using |
This issue is strongly tied to #301. |
Thoughts on using |
What are the advantages of said crate? It says it tries to solve a lot of problems |
From listening to a talk about |
@Hittherhod. From my experience you easily can define multiple |
I'm in favor of moving to |
One major setback in using the failure crate is that it's very hard to maintain type information about the errors you're returning, when there is a series of possible errors. This is especially painful when some error variants are from external libraries, as as far as I know there is no way to implement foreign errors like in error-chain. Furthermore, much like in error chain, I don't think there is an easy way to chain errors without losing type information. |
for reference https://github.com/rust-lang-nursery/failure Where do we go from here? failure vs error_chain vs ?? |
For note: |
It doesn't need to be a library, we can use the standard built-in error handling in rust, using |
Even if Failure is used it is still recommended to make your own error enum and don't use the generic Error as that one is designed only for generic setup and testing, not for actual publication. The rest of the stuff in Failure is still very useful. |
While working through dealing with some of the |
Actually, it appears that we should probably wait for the work and effects of RFC 2504 (rust-lang/rust#53487) to settle, since it'll likely effect the api of |
This issue is no longer of value. We have an error strategy by now. |
So we need
amethyst_assets::Progress
stuff)There are many locations where such improvements can be made, so I'm gonna set this to
easy
and ask for help here. Small PRs are preferred here.The text was updated successfully, but these errors were encountered: