mIRC Home    About    Download    Register    News    Help

Print Thread
#162740 22/10/06 03:09 PM
Joined: Apr 2006
Posts: 399
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 399
is there any way to either add on the this, or customize it?
Quote:

-
* /sockopen: 'ophours' socket in use (line 96, xxHour-Panel)
-

Joined: Feb 2004
Posts: 2,013
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Feb 2004
Posts: 2,013
Code:
alias example {
  sockwrite fop example
  return
  :error
  echo -ac info $error -- <your message here>
  reseterror
}


/help $error, and scroll down to Error handling

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Two ways:

1.
Code:
if ($sock(ophours)) { ; display custom error and return }


2.
Code:
sockopen ophours ... ...
return
:error
var %err = * /sockopen: 'ophours' socket in use (line 96, xxHour-Panel)
if ($error == %err) {
  ; Display custom error
  reseterror
}

Joined: Apr 2006
Posts: 399
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 399
I'm not talking only about sockets, I just used that as an example, is there a way to control ALL the errors? is it Error Handling?

Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Yeah. FiberOPtics' post explains how you would go about capturing errors in general smile

Joined: Apr 2006
Posts: 399
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 399
ok, got it, thanks guys.


Link Copied to Clipboard