DescriptionImprove Crypto::getRandomValues exception messages.
This CL improves the detail available in the Crypto::getRandomValues exceptions
generated when the array is either too long, nonexistent, or incorrectly typed.
The interesting bit of the CL is, however, not the new error message, but the
mechanism by which it's generated. ExceptionState may now have some additional
context passed in via the constructor, which allows us to generate the
boilerplate bits of the exception message ("Failed to execute XXX on YYY:")
inside ExceptionState rather than out in the calling code.
This isn't a huge deal for Crypto, but it will substantially reduce the
duplication we're currently forcing developers into when throwing
detailed exceptions, as we'll be able to set these values once and
only once (eventually in the generated bindings) rather than for each
exception individually.
BUG=270033
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162761
Patch Set 1 #
Total comments: 2
Patch Set 2 : Compile. #Patch Set 3 : Names. #Patch Set 4 : DEBUG. #Messages
Total messages: 16 (0 generated)
|