Why can’t I use of Spring Boot Exception Handler?

Anar Məmmədov
1 min readDec 25, 2021

--

as you know, Spring Boot Exception Handler can be used when Exception handling necessary and it is more flexibile and readble instead of basic try-catch block.

But there is a general moments where you must not use Spring Boot of Exception Handler. I show you a good also briliant excample that, why can’t you use of this Spring Boot Exception handler.

A few days ago I was working on a project and I had to perform an operation in this project like this:

a)when exception occur, I catch it and save this exception message to the database and so on.

I tried to making such a this operation using Spring Boot Exception Handling but I didn’t. So I confused a few minutes and I found a some logic,which I thought if exception occur than I catch it and save this exception to the database in the catch block. Pay attention to what I say “in the catch blokc”.

Have you ever write some logic process in the catch block like as I said? if no than you can use this logic your own project. Enjoy I hope you understand what I say. Good coding day.

--

--

Anar Məmmədov
Anar Məmmədov

Written by Anar Məmmədov

Java Backend Developer wondering RDBMS and processing of structure any technology that is related backend.

No responses yet