I am not sure why I am getting this error. Can anyone help?
public static void main(String[] args) throws IOException, InvalidMidiDataException {
MusicEditorCreater.Builder builder = new MusicEditorCreater.Builder();
IMusicEditorModel model = MusicReader.parseFile(new FileReader(args[0]), builder);
IMusicEditorView view;
switch (args[1]) {
case "text": view = new SheetMusicTextView();
break;
case "gui": view = new SheetMusicView();
break;
case "midi": view = new MidiView();
break;
case "combined": view = new MidiGuiView();
break;
default:
throw new IllegalArgumentException("Not a valid view");
}
I'm creating a Music Editor for class and this is the very last part, I just don't understand why it's throwing this error. Thanks.