Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try
- {
- string line = ReadLine();
- if (line.Length == 0)
- {
- throw new FormatException("Invalid line format");
- }
- WriteLine("Some good stuff");
- }
- catch (FormatException e)
- {
- WriteLine("Error: The program will now exit!");
- }
- finally
- {
- Exit();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement