Do we have an exception policy?
Do we have a policy what kind of exceptions we throw/catch? And if not, should we have one?
I noticed that in several places we just catch exceptions of the type WException. In many cases this is okay, and we ensure that we catch the exceptions that we throw ourselves here and not just anything. BUT this can also be problematic at some points, because not even all our own custom exceptions are inherited from WException. For example, the filesystem stuff has its own FileError and ZipOperationError exception types.
Should we try to inherit all our custom exception types from WException? (This might be non-trivial.)
Or should we just be more careful with catches?
What do you think?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- widelands Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Arty for more information if necessary.