try tabline console readline tabif line length tabtabthrow new emptylineexception the line read from console was empty tab tabconsole printline hello s line tabconsole printline the program ran successfully catch emptylineexception e tabconsole printline hello catch exception e tabconsole printline error e message finally tabconsole printline the program terminates now