B
B
Biaci_Anj2022-02-15 20:20:12
Java
Biaci_Anj, 2022-02-15 20:20:12

Is it ok to throw actions in Spring boot web app?

I know that the program slows down during the try {} catch, but I already wrote it and there is no time to redo it.
The logic of the program is as follows:
If the user wants to place an order and he has no money -> the InsufficientFunds exception is thrown and caught in the controller -> it is logged and sent to the front.

To what extent is this a gross error and is it a mistake at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2022-02-15
@Biaci_Anj

Fine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question