You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid throwing exceptions in HashValidator. (#1753)
In general, we prefer not to throw exceptions to signal an hash mismatch
error. This makes the code easier to use if the application has disabled
exceptions.
There is one case where we must throw an exception though: if an error is
detected in the ObjectReadStreambuf the only mechanism to signal error is
exceptions (these classes must obey the protocol defined by the standard
library, and the library is designed with exceptions in mind). When
exceptions are disabled and we detect such errors we set the `status()`,
and the application is expected to check it. This is not ideal, but the
best that can be done in that case.
0 commit comments