Using PerlScript In ASP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KaXo

    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::INE T->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:_Unkno wn_error".

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

    #2
    Re: Using PerlScript In ASP

    kaxo@sina.com (KaXo) wrote in message news:<80f2d4af. 0403010650.30fe 1dd4@posting.go ogle.com>...[color=blue]
    > 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::INE T->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:_Unkno wn_error".
    >
    > there is "on err resume next" in vbscript. and perlscript?[/color]

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

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

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

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

    Comment

    • KaXo

      #3
      Re: Using PerlScript In ASP

      pangzi74@hotmai l.com (Will Stranathan) wrote in message news:<6a84f8d.0 403020711.14417 431@posting.goo gle.com>...[color=blue]
      > kaxo@sina.com (KaXo) wrote in message news:<80f2d4af. 0403010650.30fe 1dd4@posting.go ogle.com>...[color=green]
      > > 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::INE T->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:_Unkno wn_error".
      > >
      > > there is "on err resume next" in vbscript. and perlscript?[/color]
      >
      > either eval or do checking on $r_socket the next line:
      >
      > eval {
      > $r_socket = IO::Socket::INE T->new(
      > # etc
      > );
      > };
      >
      > if the error is on the IO::Socket::INE T->new line, or:
      >
      > $r_socket = IO::Socket::INE T->new(
      > # etc
      > );
      > if (! defined $r_socket) {
      > $Response->Write("<b>Clie nt disconnected</b>");
      > } else {
      > # do something with $r_socket
      > }[/color]

      thank you very much. it works fine now.

      Comment

      Working...