NAME
Geo::Location::IP::Error::Generic - Generic error class
VERSION
version 0.002
SYNOPSIS
use 5.036;
use Geo::Location::IP::Database::Reader;
my $reader = Geo::Location::IP::Database::Reader->new(
file => '/path/to/Country.mmdb'
);
local $@;
eval {
my $country_model = $reader->country(ip => '192.0.2.1');
};
if (my $e = $@) {
if ($e isa 'Geo::Location::IP::Error::Generic') {
warn $e->message;
}
}
DESCRIPTION
A generic error class.
SUBROUTINES/METHODS
throw
Geo::Location::IP::Error::Generic->throw(
message => "We're outta here!",
);
Raises an exception with the specified message.
message
my $message = $e->message;
Returns the message.
Objects also stringify to their message.
DIAGNOSTICS
None.
CONFIGURATION AND ENVIRONMENT
None.
DEPENDENCIES
None.
INCOMPATIBILITIES
None.
BUGS AND LIMITATIONS
None known.
AUTHOR
Andreas Vögele <voegelas@cpan.org>
LICENSE AND COPYRIGHT
Copyright (C) 2025 Andreas Vögele
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.