An exception throw should, of course, only be performed in an exceptional situation.
For processing, I would say that there are two circumstances when you want to catch an exception:
when translation is done
- To error code
- To another exception
- To something that the user can understand.
on the border of the module
- Return from COM calls, for example (to infrastructure without exception)
- Return from the stream (no one will catch it otherwise)
- ( , .)
, try-catch-clean-rethrow, RAII ... . , . , , .
MakerOfThings7 , .
"- ", , , .
, , , . . . ? , , MemoryStreamException, FileException DatabaseException. , 15 , .
, , . , DataStorageException . .
, , , , .