11-11-2009, 10:16 AM
Error is an expected situation in your Script. For example, Consider a situation where you specified a divided by zero in your script logic, and the script throws an error. So you will need to handle this wherever your logic expects.
Where as exception is a runtime error that the AUT might encounter during the execution of your script.
For example you are trying to login into your application and application throws an error for database connectivity lost or something like Connection closed or license expired. These are exceptions which are unpredictable errors during runtime.
So in my opinion error handling is to put your logic to handle an expected error in your script and eception handling is to handle an unexpected error thrown by application /script at runtime.
Where as exception is a runtime error that the AUT might encounter during the execution of your script.
For example you are trying to login into your application and application throws an error for database connectivity lost or something like Connection closed or license expired. These are exceptions which are unpredictable errors during runtime.
So in my opinion error handling is to put your logic to handle an expected error in your script and eception handling is to handle an unexpected error thrown by application /script at runtime.