Add TestException.

Not really for use as a unit test as yet. Available in TestShell though.