Closed calebmer closed 8 years ago
Well I think that we can implement the From
trait for Error where it is needed. The iron crate will always exist in the project since it is a dep. However if we were to make it a feat, then we could only compile said code when the feat is enabled.
Yeah, I agree that's the best response.
So, how do we want to handle errors? I'm experimenting a bit with what
ardite-rest
will look like and I really want to write the following code:However,
schema.validate_query
returns anardite::error::Error
andIronResult
expects aniron::error::IronError
. So my question is, inardite
core, should we implementInto
for any possible error type that might be used in server code, or put theInto
implementation inside the server code which needs it? Also, is there a way to optionally compile a bit of rust code if theiron
crate exists in the project for instance?