Hi All,
I am looking to throw a general Exception in Java.
The "situation" is basically if an empty line is encountered, an exception is thrown and the blank line ignored.
Now, I come from a C# background so I would just throw a normal Exception. In Java, is there one? I can't seem to find it.
I know I could assert, but would this solve the problem correctly using an AssertionException ?
Thanks,
Kyle
EDIT:
Thanks for the answers. Unfortunately it was my own foolishness that allowed me to miss Exception, which I found just before checking back. I accepted Bills answer for the assertion comment, considering I couldn't delete the question due to too many up votes (in like 10 seconds I might add, hehe).