You should call this right before the line you expect to throw the exception, and have no code after that line.