469,610 Members | 2,449 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

Using PerlScript In ASP

I use PerlScript in ASP, where got a Error, IIS will send the Error
messenge to client. how to resume asp running? my asp need to handle
the errors.

For Example:
$r_socket = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
Timeout => 4);

where $host was closed, IIS will return "HTTP 500 - Internal server
error".
Error in IIS log is "|2|80004005|IO::Socket::INET:_connect:_Unknown_er ror".

there is "on err resume next" in vbscript. and perlscript?
Jul 19 '05 #1
2 2937
ka**@sina.com (KaXo) wrote in message news:<80**************************@posting.google. com>...
I use PerlScript in ASP, where got a Error, IIS will send the Error
messenge to client. how to resume asp running? my asp need to handle
the errors.

For Example:
$r_socket = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
Timeout => 4);

where $host was closed, IIS will return "HTTP 500 - Internal server
error".
Error in IIS log is "|2|80004005|IO::Socket::INET:_connect:_Unknown_er ror".

there is "on err resume next" in vbscript. and perlscript?


either eval or do checking on $r_socket the next line:

eval {
$r_socket = IO::Socket::INET->new(
# etc
);
};

if the error is on the IO::Socket::INET->new line, or:

$r_socket = IO::Socket::INET->new(
# etc
);
if (! defined $r_socket) {
$Response->Write("<b>Client disconnected</b>");
} else {
# do something with $r_socket
}
Jul 19 '05 #2
pa******@hotmail.com (Will Stranathan) wrote in message news:<6a*************************@posting.google.c om>...
ka**@sina.com (KaXo) wrote in message news:<80**************************@posting.google. com>...
I use PerlScript in ASP, where got a Error, IIS will send the Error
messenge to client. how to resume asp running? my asp need to handle
the errors.

For Example:
$r_socket = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,
Proto => 'tcp',
Timeout => 4);

where $host was closed, IIS will return "HTTP 500 - Internal server
error".
Error in IIS log is "|2|80004005|IO::Socket::INET:_connect:_Unknown_er ror".

there is "on err resume next" in vbscript. and perlscript?


either eval or do checking on $r_socket the next line:

eval {
$r_socket = IO::Socket::INET->new(
# etc
);
};

if the error is on the IO::Socket::INET->new line, or:

$r_socket = IO::Socket::INET->new(
# etc
);
if (! defined $r_socket) {
$Response->Write("<b>Client disconnected</b>");
} else {
# do something with $r_socket
}


thank you very much. it works fine now.
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by rawCoder | last post: by
10 posts views Thread by Christopher Benson-Manica | last post: by
17 posts views Thread by beliavsky | last post: by
14 posts views Thread by john.burton.email | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.