1Moose::Exception(3)   User Contributed Perl Documentation  Moose::Exception(3)
2
3
4

NAME

6       Moose::Exception - Superclass for Moose internal exceptions
7

VERSION

9       version 2.2206
10

DESCRIPTION

12       This class contains attributes which are common to all Moose internal
13       exception classes.
14

WARNING WARNING WARNING

16       If you're writing your own exception classes, you should instead prefer
17       the Throwable role or the Throwable::Error superclass - this is
18       effectively a cut-down internal fork of the latter, and not designed
19       for use in user code.
20
21       Of course if you're writing metaclass traits, it would then make sense
22       to subclass the relevant Moose exceptions - but only then.
23

METHODS

25   $exception->message
26       This attribute contains the exception message.
27
28       Every subclass of Moose::Exception is expected to override
29       "_build_message" method in order to construct this value.
30
31   $exception->trace
32       This attribute contains the stack trace for the given exception. It
33       returns a Devel::StackTrace object.
34
35   $exception->as_string
36       This method returns a stringified form of the exception, including a
37       stack trace. By default, this method skips Moose-internal stack frames
38       until it sees a caller outside of the Moose core. If the
39       "MOOSE_FULL_EXCEPTION" environment variable is true, these frames are
40       included.
41

SEE ALSO

43       •   Moose::Manual::Exceptions
44

AUTHORS

46       •   Stevan Little <stevan@cpan.org>
47
48       •   Dave Rolsky <autarch@urth.org>
49
50       •   Jesse Luehrs <doy@cpan.org>
51
52       •   Shawn M Moore <sartak@cpan.org>
53
54       •   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
55
56       •   Karen Etheridge <ether@cpan.org>
57
58       •   Florian Ragwitz <rafl@debian.org>
59
60       •   Hans Dieter Pearcey <hdp@cpan.org>
61
62       •   Chris Prather <chris@prather.org>
63
64       •   Matt S Trout <mstrout@cpan.org>
65
67       This software is copyright (c) 2006 by Infinity Interactive, Inc.
68
69       This is free software; you can redistribute it and/or modify it under
70       the same terms as the Perl 5 programming language system itself.
71
72
73
74perl v5.38.0                      2023-07-23               Moose::Exception(3)
Impressum