mIRC Home    About    Download    Register    News    Help

Print Thread
on *:merror #118042 21/04/05 06:01 PM
Joined: Oct 2004
Posts: 24
D
darkrift Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Oct 2004
Posts: 24
do you think it would be a good idea to creat an event to capture mIRC command error and create a command that will allow to capture them when we build our own commands

for example to caatch those error:

* /write: unable to open 'C:\Program Files\mIRCtest\c~o~g~i~t~o~b~o~t\'C%1%%2%Program\create~Files%2%mIRCtest%2%c~o~g~i~t~o~b~o~t%2%--------------------'.txt' (line 50, brain.CGB)

* /set: line too long (line 67, brain.CGB)

and creating an error command like /error /cmdname: error parameter

or maybe it already exists and I don't know what it is ..


the way it's supposed to be !

UnderNet #scripting - #mircscripting
Re: on *:merror #118043 21/04/05 06:13 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
cant u just trap that with the standard error trapping?

Re: on *:merror #118044 21/04/05 06:22 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
There is error handling support already, although it would be very nice to be able to capture and handle errors at a global scale so I support your suggestion. smile

Btw, the current way to handle errors is like this:

Code:
alias test {
  ; Try to execute a command that doesn't exist.
  nonexistantcommand
  ; Make sure the code beyond the error label isn't executed normally.
  return
  ; Error label (This is where mIRC jumps to if it encounters an error)
  :error
  ; Try to fix the error, or in this case just echo it.
  echo -a Error! $error
  ; Hide the default display.
  reseterror
}


New username: hixxy