try { var numero = (int)Math.round(Math.random() * numeroPedidos); partidaBillar(); sendtracking(numero); } catch(Exception e) { e.wait(); }