How to get line number from text file after an if statement
<p>i was wondering how i can get a line number from a text file that meets certain conditions from an if statement. For example </p>

<pre><code>if(textline == null){
     throw new Exception("There is no data in Line " + bufferedreader.getLineNumber() +1);
}
</code></pre>

<p>I want to get the line number when there is an empty row to throw an exception. 
I tried the above method but clearly that won't work. Any help would be appreciated.</p>