There was a recent discussion where I found try ... catch
to be a reasonable solution if the exception is thrown only occasionally. try
is not very costly, catch
is. @Elrod kindly provided a lot of useful benchmarks there.
2 Likes