title: Try and Catch In Pascal
body: <p>I'm using Dev-Pas 1.9.2 and am trying to make sure the program doesn't crash when a symbol or a letter value is entered.</p>
  
  <p>I've googled and googled and can't find any resoruce on how to achieve this.</p>
  
  <p>Any help is greatly appreciated. Thanks!</p>
  
  <p>Here is the code I'm trying to manage the input:</p>
  
  <pre><code> Function GetMenuChoice : Integer;
    Var
      OptionChosen : Integer;
    Begin
      Write('Please enter your choice: ');
      Readln(OptionChosen);
      If (OptionChosen &lt; 1) Or ((OptionChosen &gt; 4) And (OptionChosen &lt;&gt; 9))
        Then
          Begin
            Writeln;
            Writeln('That was not one of the allowed options.  Please try again: ');
          End;
      GetMenuChoice := OptionChosen;
    End;
  </code></pre>