| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## HTML Object - ~/lib/HTML/Object/Exception.pm | ||
| 3 | ## Version v0.2.0 | ||
| 4 | ## Copyright(c) 2021 DEGUEST Pte. Ltd. | ||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||
| 6 | ## Created 2021/11/27 | ||
| 7 | ## Modified 2022/09/18 | ||
| 8 | ## All rights reserved. | ||
| 9 | ## | ||
| 10 | ## | ||
| 11 | ## This program is free software; you can redistribute it and/or modify it | ||
| 12 | ## under the same terms as Perl itself. | ||
| 13 | ##---------------------------------------------------------------------------- | ||
| 14 | package HTML::Object::Exception; | ||
| 15 | BEGIN | ||
| 16 | { | ||
| 17 | use strict; | ||
| 18 | use warnings; | ||
| 19 | warnings::register_categories( 'HTML::Object' ); | ||
| 20 | use parent qw( Module::Generic::Exception ); | ||
| 21 | use vars qw( $VERSION ); | ||
| 22 | our $VERSION = 'v0.2.0'; | ||
| 23 | }; | ||
| 24 | |||
| 25 | use strict; | ||
| 26 | use warnings; | ||
| 27 | |||
| 28 | sub columnNumber { return( shift->_set_get_number( 'column', @_ ) ); } | ||
| 29 | |||
| 30 | sub colno { return( shift->columnNumber( @_ ) ); } | ||
| 31 | |||
| 32 | sub fileName { return( shift->file( @_ ) ); } | ||
| 33 | |||
| 34 | sub filename { return( shift->file( @_ ) ); } | ||
| 35 | |||
| 36 | sub lineNumber { return( shift->line( @_ ) ); } | ||
| 37 | |||
| 38 | sub lineno { return( shift->line( @_ ) ); } | ||
| 39 | |||
| 40 | sub name { return( ref( $_[0] ) || $_[0] ); } | ||
| 41 | |||
| 42 | sub stack { return( shift->trace ); } | ||
| 43 | |||
| 44 | sub toLocalString { return( shift->as_string ); } | ||
| 45 | |||
| 46 | sub toString { return( shift->as_string ); } | ||
| 47 | |||
| 48 | { | ||
| 49 | package | ||
| 50 | HTML::Object::HierarchyRequestError; | ||
| 51 | BEGIN | ||
| 52 | { | ||
| 53 | use parent -norequire, qw( HTML::Object::Exception ); | ||
| 54 | }; | ||
| 55 | |||
| 56 | package HTML::Object::IndexSizeError; | ||
| 57 | BEGIN | ||
| 58 | { | ||
| 59 | use parent -norequire, qw( HTML::Object::Exception ); | ||
| 60 | }; | ||
| 61 | |||
| 62 | package | ||
| 63 | HTML::Object::InvalidCharacterError; | ||
| 64 | BEGIN | ||
| 65 | { | ||
| 66 | use parent -norequire, qw( HTML::Object::Exception ); | ||
| 67 | }; | ||
| 68 | |||
| 69 | package | ||
| 70 | HTML::Object::InvalidStateError; | ||
| 71 | BEGIN | ||
| 72 | { | ||
| 73 | use parent -norequire, qw( HTML::Object::Exception ); | ||
| 74 | }; | ||
| 75 | |||
| 76 | package HTML::Object::MediaError; | ||
| 77 | BEGIN | ||
| 78 | { | ||
| 79 | use parent -norequire, qw( HTML::Object::Exception ); | ||
| 80 | }; | ||
| 81 | |||
| 82 | package HTML::Object::NotFoundError; | ||
| 83 | BEGIN | ||
| 84 | { | ||
| 85 | use parent -norequire, qw( HTML::Object::Exception ); | ||
| 86 | }; | ||
| 87 | |||
| 88 | package | ||
| 89 | HTML::Object::SyntaxError; | ||
| 90 | BEGIN | ||
| 91 | { | ||
| 92 | use parent -norequire, qw( HTML::Object::Exception ); | ||
| 93 | }; | ||
| 94 | |||
| 95 | package | ||
| 96 | HTML::Object::TypeError; | ||
| 97 | BEGIN | ||
| 98 | { | ||
| 99 | use parent -norequire, qw( HTML::Object::Exception ); | ||
| 100 | }; | ||
| 101 | } | ||
| 102 | |||
| 103 | 1; | ||
| 104 | # NOTE: POD | ||
| 105 | __END__ |