Skip to content

Commit 3fc2143

Browse files
committed
Added release updates
1 parent 1ddfc13 commit 3fc2143

File tree

4 files changed

+58
-15
lines changed

4 files changed

+58
-15
lines changed

CHANGES

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
11
Changelog for Data-Object-Exception
2-
3-
2.01 2020-02-17T05:23:10
4-
- Added release updates
5-
- Re-releasing to the CPAN
6-
7-
2.00 2020-02-04T03:37:30
8-
- Built release version 2.00
9-
- Added release updates
10-
- Update release script and workflow
11-
- Extract from framework
12-
- Initial commit

Makefile.PL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ my %WriteMakefileArgs = (
2929
"strict" => 0,
3030
"warnings" => 0
3131
},
32-
"VERSION" => "2.01",
32+
"VERSION" => "2.02",
3333
"test" => {
3434
"TESTS" => "t/*.t"
3535
}

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.01
1+
2.02

lib/Data/Object/Exception.pod

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,36 @@ The package allows objects to be instantiated with key-value arguments.
6060

6161
=cut
6262

63+
=head1 ATTRIBUTES
64+
65+
This package has the following attributes:
66+
67+
=cut
68+
69+
=head2 context
70+
71+
context(Any)
72+
73+
This attribute is read-only, accepts C<(Any)> values, and is optional.
74+
75+
=cut
76+
77+
=head2 id
78+
79+
id(Str)
80+
81+
This attribute is read-only, accepts C<(Str)> values, and is optional.
82+
83+
=cut
84+
85+
=head2 message
86+
87+
message(Str)
88+
89+
This attribute is read-only, accepts C<(Str)> values, and is optional.
90+
91+
=cut
92+
6393
=head1 METHODS
6494

6595
This package implements the following methods:
@@ -88,22 +118,46 @@ The explain method returns an error message with stack trace.
88118

89119
=head2 throw
90120

91-
throw(Str $class, Any $context, Maybe[Number] $offset) : Any
121+
throw(Tuple[Str, Str] | Str $message, Any $context, Maybe[Number] $offset) : Any
92122

93-
The throw method throws an error with message.
123+
The throw method throws an error with message (and optionally, an ID).
94124

95125
=over 4
96126

97127
=item throw example #1
98128

99129
use Data::Object::Exception;
100130

131+
my $exception = Data::Object::Exception->new;
132+
133+
$exception->throw('Oops!')
134+
135+
=back
136+
137+
=over 4
138+
139+
=item throw example #2
140+
141+
use Data::Object::Exception;
142+
101143
my $exception = Data::Object::Exception->new('Oops!');
102144

103145
$exception->throw
104146

105147
=back
106148

149+
=over 4
150+
151+
=item throw example #3
152+
153+
use Data::Object::Exception;
154+
155+
my $exception = Data::Object::Exception->new;
156+
157+
$exception->throw(['E001', 'Oops!'])
158+
159+
=back
160+
107161
=cut
108162

109163
=head2 trace

0 commit comments

Comments
 (0)