|
NAMEData::Object::ExceptionABSTRACTException Class for Perl 5SYNOPSISuse Data::Object::Exception; my $exception = Data::Object::Exception->new; # $exception->throw DESCRIPTIONThis package provides functionality for creating, throwing, and introspecting exception objects.SCENARIOSThis package supports the following scenarios:args-1use Data::Object::Exception; my $exception = Data::Object::Exception->new('Oops!'); # $exception->throw The package allows objects to be instantiated with a single argument. args-kvuse Data::Object::Exception; my $exception = Data::Object::Exception->new(message => 'Oops!'); # $exception->throw The package allows objects to be instantiated with key-value arguments. ATTRIBUTESThis package has the following attributes:contextcontext(Any) This attribute is read-only, accepts "(Any)" values, and is optional. idid(Str) This attribute is read-only, accepts "(Str)" values, and is optional. messagemessage(Str) This attribute is read-only, accepts "(Str)" values, and is optional. METHODSThis package implements the following methods:explainexplain() : Str The explain method returns an error message with stack trace.
throwthrow(Tuple[Str, Str] | Str $message, Any $context, Maybe[Number] $offset) : Any The throw method throws an error with message (and optionally, an ID).
tracetrace(Int $offset, $Int $limit) : Object The trace method compiles a stack trace and returns the object. By default it skips the first frame.
AUTHORAl Newkirk, "awncorp@cpan.org"LICENSECopyright (C) 2011-2019, Al Newkirk, et al.This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file" <https://github.com/iamalnewkirk/data-object-exception/blob/master/LICENSE>. PROJECTWiki <https://github.com/iamalnewkirk/data-object-exception/wiki>Project <https://github.com/iamalnewkirk/data-object-exception> Initiatives <https://github.com/iamalnewkirk/data-object-exception/projects> Milestones <https://github.com/iamalnewkirk/data-object-exception/milestones> Contributing <https://github.com/iamalnewkirk/data-object-exception/blob/master/CONTRIBUTE.md> Issues <https://github.com/iamalnewkirk/data-object-exception/issues>
Visit the GSP FreeBSD Man Page Interface. |