[INTTEST-46] Make exceptions more informative Created: 15/May/18 Updated: 15/May/18 |
|
| Status: | Open |
| Project: | integration-test |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Dibya Prakash Das | Assignee: | Dibya Prakash Das |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Here and in other places, if an exception occurs, not enough information is logged. It can changed to something like try: ... except Exception as e: print("{} :- {}".format(type(e), e)) print('Unable to push data to ElasticSearch') When I ran this code, I got a type error because in Python 3 the json.loads expects a decoded string and not bytes (which was fine in python 2). Any other type of exception might occur hence this is a good thing to add.
|