line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SPVM::ExchangeAPI::Error; |
2
|
278
|
|
|
278
|
|
1987
|
use strict; |
|
278
|
|
|
|
|
563
|
|
|
278
|
|
|
|
|
9839
|
|
3
|
278
|
|
|
278
|
|
1429
|
use warnings; |
|
278
|
|
|
|
|
597
|
|
|
278
|
|
|
|
|
37536
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# Fields |
6
|
|
|
|
|
|
|
sub id { |
7
|
14
|
|
|
14
|
1
|
940
|
my $self = shift; |
8
|
14
|
100
|
|
|
|
103
|
if (@_) { |
9
|
2
|
|
|
|
|
9
|
$self->{id} = $_[0]; |
10
|
2
|
|
|
|
|
6
|
return $self; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
else { |
13
|
12
|
|
|
|
|
77
|
return $self->{id}; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Class Methods |
18
|
|
|
|
|
|
|
sub new { |
19
|
6
|
|
|
6
|
1
|
18
|
my $error = shift; |
20
|
|
|
|
|
|
|
|
21
|
6
|
|
|
|
|
29
|
my $self = { |
22
|
|
|
|
|
|
|
id => 0, |
23
|
|
|
|
|
|
|
@_ |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
|
26
|
6
|
|
33
|
|
|
50
|
bless $self, ref $error || $error; |
27
|
|
|
|
|
|
|
|
28
|
6
|
|
|
|
|
22
|
return $self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 Name |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
SPVM::ExchangeAPI::Error - Error Code |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 Description |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
The SPVM::ExchangeAPI::Error class has methods to get and set an error id. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 Usage |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $error = SPVM::ExchangeAPI::Error->new; |
44
|
|
|
|
|
|
|
$error->id(2); |
45
|
|
|
|
|
|
|
my $die_error_id = $error->id; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 Fields |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 id |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $id = $error->id; |
52
|
|
|
|
|
|
|
$error->id($id); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Gets and sets an error id. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Examples: |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
$error->id(2); |
59
|
|
|
|
|
|
|
my $id = $error->id; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 Class Methods |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 new |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
my $error = SPVM::ExchangeAPI::Error->new(%options); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Creates a new C object. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Options: |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=over 2 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item * C |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
An error id. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=back |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 Copyright & License |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Copyright (c) 2023 Yuki Kimoto |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
MIT License |