Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RobotError: Fix __repr__()/__str__() issue.
Commit 280f8d3 already tried to improve this, but the reliable way to render an exception message is to pass it as the first argument to the `Exception` superclass constructor; see: https://stackoverflow.com/questions/1319615/proper-way-to-declare-custom-exceptions-in-modern-python This guarantees that both `repr()` and `str()` are set as expected. Until now, for example, `repr()` did not actually render the exception name "RobotError", which was confusing, as all other Python exceptions do that, and the docs say that it should. Similarly, the fix from 280f8d3 actually broke the `str()`, which until now was just `RobotError()`. This commit fixes both these issues.
- Loading branch information