- /**
- * Read the selected chapter (starting at 1).
- *
- * @param chapter
- * the chapter
- */
- public void read(int chapter) {
- if (chapter > getStory().getChapters().size()) {
+ public void read(int chapter) throws IOException {
+ MetaData meta = getMeta();
+
+ if (meta == null) {
+ throw new IOException("No story to read");
+ }
+
+ // TODO: progress?
+ if (chapter > getStory(null).getChapters().size()) {