Better exception handling 72/115972/1
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 1 Dec 2020 16:49:31 +0000 (17:49 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 1 Dec 2020 16:51:56 +0000 (17:51 +0100)
commit9c71e24adaaedd07d7e2e65922c5a3cee27318c9
treea47f904d81a6afbadd8b451563d34fcd974e6bcd
parenta6fe8be6c1d1eb9e7293ed1c3bb63a76646fe22c
Better exception handling

Instead of catching all exceptions that can occurs and miss one, let's
create a "parent" exception class for OnapTest and catch only this one.

In order to know what's the error, we also create a class attribute
(`error_message`) that gives us the reason for exception.

Issue-ID: INT-1796
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: I798d8c6270c466b1d9be6511f52fd9441401c9c8
src/onaptests/scenario/basic_cnf.py
src/onaptests/scenario/basic_network.py
src/onaptests/scenario/basic_vm.py
src/onaptests/scenario/clearwater_ims.py
src/onaptests/utils/exceptions.py