NAME

Perlgram::Error - Error handling for Perlgram

SYNOPSIS

use Perlgram::Error;
Perlgram::Error->new(message => "API error", code => 400)->throw;

DESCRIPTION

This module provides a simple error class for the Perlgram library, used to handle API and HTTP errors from the Telegram Bot API.

METHODS

new(message => $msg, code => $code)

Creates a new error object with a message and error code.

message

Returns the error message.

code

Returns the error code.

throw

Throws the error using Carp::croak, including the message and code.

AUTHOR

AmiRCandy <amirhosen.1385.cmo@gmail.com>

LICENSE

Artistic License 2.0