errors.rs 577 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//! Error types for `TVMArgValue` and `TVMRetValue` conversions.

error_chain! {
    errors {
        TryFromTVMArgValueError(expected: String, actual: String) {
              description("mismatched types while converting from TVMArgValue")
              display("expected `{}` but given `{}`", expected, actual)
        }

        TryFromTVMRetValueError(expected: String, actual: String) {
              description("mismatched types while downcasting TVMRetValue")
              display("invalid downcast: expected `{}` but given `{}`", expected, actual)
        }
    }
}