|
|
|
|
|
by Seb-C
2116 days ago
|
|
> Use exceptions for control flow. With different exceptions leading to entirely different flows. On C you can use setjmp/longjmp + globals for a similar effect. This will help the maintenance programmer develop thinking in multiple dimensions. I recommend writing a CustomException class instead. So everytime you see a third-party error, catch it and throw a new CustomException() (Without arguments, otherwise you may carry some bad third-party classes/exceptions in your codebase). And don't forget to catch CustomException at strategic places too, so you can actually throw a new CustomException(). |
|