you could alternatively sort the errortype in knone  krangeerror  ktypeerror  kfirstwasm  kcompileerror kfirstwasm and then just compare error type  here with kfirstwasm  we do something like this for relocinfo  for instance