Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-4029

[Rust] Improve the error messages related to value resolving

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.18.0
    • rust

    Description

      While working on AVRO-4024 I noticed that the error messages print only the value's kind, i.e. type. IMO it would be better to print the value itself, so the developer could easily debug the problem.

      For example Schema:Double could accept special string values like "NaN" or "Inf". Passing a value like Value::String("unknown") would fail with error like "double expected, got String".

      Now the error is:

       Expected Value::Double, Value::Float, Value::Int, Value::Long or Value::String ("NaN", "INF", "Infinity", "-INF" or "-Infinity"), got: Value::String('unknown')"

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              mgrigorov Martin Tzvetanov Grigorov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m