1VM::EC2::Error(3) User Contributed Perl Documentation VM::EC2::Error(3)
2
3
4
6 VM::EC2::Error - Object describing an error emitted by the Amazon API
7
9 use VM::EC2;
10
11 $ec2 = VM::EC2->new(...);
12 $instance = $ec2->describe_instance(-instance_id=>'invalid-name');
13 die $ec2->error if $ec2->is_error;
14
16 This object represents an error emitted by the Amazon API. VM::EC2
17 method calls may return undef under either of two conditions: the
18 request may simply have no results that satisfy it (for example, asking
19 to describe an instance whose ID does not exist), or an error occurred
20 due to invalid parameters or communication problems.
21
22 As described in VM::EC2, the VM::EC2->is_error method returns true if
23 the last method call resulted in an error, and VM::EC2->error returns
24 the content of the error message.
25
27 These object methods are supported:
28
29 message -- the error message
30 code -- the error code
31
33 When used in a string context, this object will interpolate the code
34 and message into a single string in the format "Message [Code]".
35
37 VM::EC2 VM::EC2::Generic
38
40 Lincoln Stein <lincoln.stein@gmail.com>.
41
42 Copyright (c) 2011 Ontario Institute for Cancer Research
43
44 This package and its accompanying libraries is free software; you can
45 redistribute it and/or modify it under the terms of the GPL (either
46 version 1, or at your option, any later version) or the Artistic
47 License 2.0. Refer to LICENSE for the full license text. In addition,
48 please see DISCLAIMER.txt for disclaimers of warranty.
49
50
51
52perl v5.32.0 2020-07-28 VM::EC2::Error(3)