All of the C++ API methods can throw exceptions. KeyView errors take the form of an instance of keyview_error
, which is itself derived from std::exception
. The exceptions that can be thrown are defined in Keyview_Errors.hpp
.
In application code, it is possible to catch and correctly handle many of these exceptions. For example, while processing many files, a format_not_supported_error
might be thrown. The correct behavior for an application might be to skip this file, or to add it to a list of files that could not be recognized. Similarly, if a password_protected_error
is thrown and caught, an application might prompt a user to enter a password and then retry.
|