With the following code, errors with $eval are not handled by my error handling code. mIRC displays an $evalnext error and halts the alias.
Code:
alias chrtest {
  var %i = 1
  while (%i <= 255) {
    var %status $iif($($+($!replace,$chr(40),a,$chr(%i),a,$chr(44),$chr(%i),$chr(44),test,$chr(41)),2) == atesta, OK, Bad)
    goto dispstat
    :error
    reseterror
    var %status = Very bad
    :dispstat
    echo 4 -a %i $+ : %status
    inc %i
  }
}