4 ms·
> doesn't cause much performance overhead Exceptions are slow when thrown. If an error happens rarely, the corresponding exception is thrown rarely, so the pe
by branko_d 4y ago
> doesn't cause much performance overhead
Exceptions are slow when thrown.
If an error happens rarely, the corresponding exception is thrown rarely, so the performance impact is minimal.
OTOH, if an error can happen frequently, it is no longer "exceptional", and so is probably better handled without exceptions anyway.