File Layout Exception
<p>I'm writing a java Application that can open and edit files. But I want it to give me an error if the layout of the file isnt as it should be.
My file looks like this:</p>

<pre><code>Title
X Y
Name
X times line
</code></pre>

<p>If looked into try and catch but that doesnt give me the right solution to give an error like:</p>

<pre><code>"There is no X or Y specified"
</code></pre>

<p>or</p>

<pre><code>"There is nog Title in this file"
</code></pre>

<p>Whats the option to do this?</p>
