-
Notifications
You must be signed in to change notification settings - Fork 2
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
"Kaitai::Struct::ValidationNotEqualError" throws letters instead of HEX-bytes like in Java. #4
Comments
ams-tschoening
changed the title
"Kaitai::Struct::ValidationNotEqualError" throws strings instead of HEX-bytes like in Java.
"Kaitai::Struct::ValidationNotEqualError" throws letters instead of HEX-bytes like in Java.
Nov 30, 2020
ams-tschoening
added a commit
to ams-ts-kaitai-runtime/ruby
that referenced
this issue
Dec 7, 2020
That's what's done in Java as well, though in Java individual bytes are separated by spaces as well. Am not doing so here to keep the implementation simple. This fixes kaitai-io#4.
ams-tschoening
added a commit
to ams-ts-kaitai-runtime/ruby
that referenced
this issue
Dec 7, 2020
That's what's done in Java as well, though in Java individual bytes are separated by spaces as well. Am not doing so here to keep the implementation simple. This fixes kaitai-io#4.
generalmimon
pushed a commit
that referenced
this issue
Dec 15, 2020
* Output HEX-bytes instead of letters for ValidationNotEqualError. That's what's done in Java as well, though in Java individual bytes are separated by spaces as well. Am not doing so here to keep the implementation simple. This fixes #4. * Added ValidationFailedError.strToHex like the corresponding "byteArrayToHex" in Java, to have the same formatted output. * HEX-conversion was already available and should be reused.
ams-tschoening
added a commit
to ams-ts-kaitai-runtime/ruby
that referenced
this issue
Mar 3, 2021
…tai-io#5) That's what's done in Java as well and HEX-conversion was already available anyway. Bracktes are added by purpose to keep output somewhat compatible with that of Java. This fixes kaitai-io#4.
generalmimon
pushed a commit
that referenced
this issue
Apr 20, 2021
…rays. (#7) * Output HEX-bytes instead of letters for ValidationNotEqualError. (#5) That's what's done in Java as well and HEX-conversion was already available anyway. Bracktes are added by purpose to keep output somewhat compatible with that of Java. This fixes #4. * Use an implementation supporting other objects than byte arrays as well. #5 (comment) * Don't handle human readable texts as byte arrays. * Rephrased docs to make more clear what is meant. * Changed phrases.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following YAML leads to the following Ruby, which leads to the error message underneath for some special input. While the error message in itself is correct and expected, it's textual content is simply different from that e.g. thrown in Java and in my opinion makes it more difficult to debug the concrete problem. I would therefore like to suggest changing the error message to provide a HEX-string instead of letters.
The error message in Ruby:
The error message in Java:
The important difference is that I get HEX-bytes in Java and a string in Ruby. I can easily change the implementation in Ruby to output a HEX-string as well:
vs.
What is the correct thing to do here?
The text was updated successfully, but these errors were encountered: