NAME
Podman::Exception - Simple generic exceptions.
SYNOPSIS
eval {
Podman::Exception->new( Code => 404 )->throw();
};
print $@;
DESCRIPTION
Podman::Exception is a simple generic exception class. Exception is thrown on any API request failure.
0 => 'Connection failed.',
304 => 'Action already processing.',
400 => 'Bad parameter in request.',
404 => 'No such item.',
409 => 'Conflict error in operation.',
500 => 'Internal server error.',
ATTRIBUTES
Code
my $Exception = Podman::Exception->new( Code => 404 );
HTTP code received from API.
Message
print $Exception->Message();
Readonly human readable exception message. The message is related to the Code.
METHODS
AUTHORS
Tobias Schäfer, <tschaefer@blackox.org>
COPYRIGHT AND LICENSE
Copyright (C) 2022-2022, Tobias Schäfer.
This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.