Thomas Lamprecht [Thu, 14 Dec 2017 10:12:06 +0000 (11:12 +0100)]
raise exception if manual fingerprint verification failed
If a fingerprint could not be verified automatically or manually
raise an exception to ensure that we do not continue with handling
the problematic or even evil response.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 14 Dec 2017 10:12:05 +0000 (11:12 +0100)]
use new Exception.pm class to signal errors to caller
Allows a caller to acces the HTTP response code, which may be useful
to handle application logic. E.g., catching a HTTP_NOT_IMPLEMENTED
and fallback to an older method.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Thu, 14 Dec 2017 10:12:04 +0000 (11:12 +0100)]
add APIClient/Exception.pm class
As we do not want to depend on PVE libraries with this I forked of
the PVE::Exception class, removed all raise_* methods so that only
raise() itself was left over.
Also some minor adaptions to newer style for exporting where used.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>