Advertisement
Guest User

Untitled

a guest
Jun 16th, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. try
  2. {
  3.     string line = ReadLine();
  4.     if (line.Length == 0)
  5.     {
  6.         throw new FormatException("Invalid line format");
  7.     }
  8.     WriteLine("Some good stuff");
  9. }
  10. catch (FormatException e)
  11. {
  12.     WriteLine("Error: The program will now exit!");
  13. }
  14. finally
  15. {
  16.     Exit();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement