add some @throws annotations for the Java crowd (fixes #264)