Test of exceptions handling