Both ways can be combined.
The exception middleware covers cases where an exception is thrown by some inner component but never gets catch, hence freeing us from the need to use try/catch blocks.
On the other hand, in some cases you want to use try/catch block, e.g. when you want to implement a retry logic for specific error (of course, if retry also fails you rethrow the exception, letting the middleware handle it).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…