mIRC Home    About    Download    Register    News    Help

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

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


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


/help $error, and scroll down to Error handling


Gone.
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
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: 400
K
Fjord artisan
OP Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
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?


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

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


-Kurdish_Assass1n

Link Copied to Clipboard