This PR adds a module to manage custom exceptions.
I have created a generic exception class called QAFrameworkException. This class will inherit from Exception and will add some extra functionality, which is as follows:
Colorize error messages: I think that is useful to show the error message as colorized. By default will be red.
Hide the traceback: In some cases, is useful to hide the traceback message, so this class will give the chance of choosing whether to show it or not. The default will be yes.
Once the QAFrameworkException is designed, we can define other subclasses to identify the exception according to a type and give the possibility to treat them differently.
The initially proposed subclasses are as follows:
ValueError: Will report unexpected values.
RuntimeError: Will report some runtime error.
ConnectionError: Will report Connection errors.
ValidationError: Will report parameter validation errors.
This PR adds a module to manage custom exceptions.
I have created a generic exception class called
QAFrameworkException
. This class will inherit fromException
and will add some extra functionality, which is as follows:Once the
QAFrameworkException
is designed, we can define other subclasses to identify the exception according to a type and give the possibility to treat them differently.The initially proposed subclasses are as follows: