How to raise an exception which tells me that the steps before it are executed successfully. For example, I have a code and the failure is in the 3rd step, how do I program an exception statement that tells me that steps 1 & 2 are successfully executed.
If step 3 depends on the successful outcome of step 1 and 2, then you shouldn't get to step 3, if 1 or 2 failed (raise an exception right there with explanation why step failed).
If step 3 doesn't depend on steps 1 and 2 then, just log the results of those with standard Print or Log... functions.
Usually you would only explain the reason for failure in exception.
Use either RaiseError( )or AppError( )function or raise statement to raise an exception and break the excution of the test.