Added a few @throws in the doc comments.