Consequences for wrong-doing

According to the book of Ezra, what did Ezra do when he discovered that some of his countrymen had married people from others nations?