summaryrefslogtreecommitdiff
path: root/fml/lib/Netlib
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-01-24 06:11:31 +0000
committerfukachan <fukachan>2001-01-24 06:11:31 +0000
commite6a9111ca4122b24ebbc7d33bc2fcf607155a9db (patch)
treedf2a4e618111f9aa39c78e644c414836bb4eceb4 /fml/lib/Netlib
parentc3c2868fe6a61ee3a5c7f3a6465b5ad1259869ea (diff)
downloadfml8-e6a9111ca4122b24ebbc7d33bc2fcf607155a9db.tar.gz
fml8-e6a9111ca4122b24ebbc7d33bc2fcf607155a9db.tar.bz2
fml8-e6a9111ca4122b24ebbc7d33bc2fcf607155a9db.zip
canonicalize error handlings to error() error_reason() pair
Diffstat (limited to 'fml/lib/Netlib')
-rw-r--r--fml/lib/Netlib/INET4.pm4
-rw-r--r--fml/lib/Netlib/SMTP.pm4
-rw-r--r--fml/lib/Netlib/Utils.pm6
3 files changed, 7 insertions, 7 deletions
diff --git a/fml/lib/Netlib/INET4.pm b/fml/lib/Netlib/INET4.pm
index ec6e8006..ce66b0f0 100644
--- a/fml/lib/Netlib/INET4.pm
+++ b/fml/lib/Netlib/INET4.pm
@@ -33,7 +33,7 @@ sub _connect4
};
if ($@) {
Log("Error: cannot make socket for $mta");
- $self->_error_why("Error: cannot make socket: $@");
+ $self->_error_reason("Error: cannot make socket: $@");
return undef;
}
@@ -45,7 +45,7 @@ sub _connect4
}
else {
Log("(debug) error. fail to connect $mta");
- $self->_error_why("Error: cannot open socket: $!");
+ $self->_error_reason("Error: cannot open socket: $!");
return undef;
}
}
diff --git a/fml/lib/Netlib/SMTP.pm b/fml/lib/Netlib/SMTP.pm
index a077ef9d..c378be96 100644
--- a/fml/lib/Netlib/SMTP.pm
+++ b/fml/lib/Netlib/SMTP.pm
@@ -193,7 +193,7 @@ sub _read_reply
if ($@ =~ /$id socket timeout/) {
my $x = $self->{'_last_command'};
Log("Error: smtp reply for \"$x\" is timeout");
- $self->_error_why("Error: smtp reply for \"$x\" is timeout");
+ $self->_error_reason("Error: smtp reply for \"$x\" is timeout");
}
}
@@ -573,7 +573,7 @@ sub _send_recipient_list_by_recipient_map
my $recipient_limit = $self->{_recipient_limit};
$obj->open || do {
- $self->_error_why( $obj->error );
+ $self->_error_reason( $obj->error );
return undef;
};
diff --git a/fml/lib/Netlib/Utils.pm b/fml/lib/Netlib/Utils.pm
index facda455..5bee5a3a 100644
--- a/fml/lib/Netlib/Utils.pm
+++ b/fml/lib/Netlib/Utils.pm
@@ -24,7 +24,7 @@ require Exporter;
$LogFunctionPointer
$SmtpLogFunctionPointer
- _error_why
+ _error_reason
error
error_reset
@@ -81,7 +81,7 @@ sub _smtplog
}
-sub _error_why
+sub _error_reason
{
my ($self, $mesg) = @_;
$self->{'_error_reason'} = $mesg;
@@ -91,7 +91,7 @@ sub _error_why
sub error_reason
{
my ($self, $mesg) = @_;
- $self->_error_why($mesg);
+ $self->_error_reason($mesg);
}