Why continue doesn't work while raising errors
<p>I'm trying to figure out why continue doesn't work when I'm rising errors:</p>

<pre><code>while True:
        a = int(raw_input('Type integer with 9 numbers '))
        if len(str(a)) &lt; 9 or len(str(a)) &gt;9:
                raise NameError('Wrong Number. Try again...')
                continue
        if not istance(a, int):
                raise ValueError("Oops!  That was no valid number.  Try again...")
                continue
        else:
                print a
                break
</code></pre>

<p>Could you point out my mistake(s)?</p>

<p>Try <code>print 'Wrong Number. Try again...'</code> instead of <code>raise</code>.</p>

<p><code>raise</code> will trigger an exception, which basically means your program is interrupted when the instruction is reached, the the exception is propagated up the call stack until it is caught by a <code>try...except</code> statement.</p>

<p>What you seem to achieve here is to <em>display</em> an error message to the user because the input is incorrect. Simply use the <code>print</code> statement for that purpose.</p>

python