Skip to content

A-FullCommitMessage

Choose a tag to compare

@larainezo larainezo released this 12 Feb 15:29

getAction() method: check that .txt file is open and loaded

getAction() method does not check whether the "bye" command has been given and the file has already been closed.

Using assert to check if the file has been closed can prevent IOExceptions from happening.

Let's,

  • update the getAction() method to use an "assert" statement to check that a file is still open before the user input action is taken