Fork me on GitHub
#yada
<
2018-08-31
>
guliy07:08:12

Hi there, can I interrupt the interceptors chain and pass the execution to the errors interceptor chain without throwing an error? my interceptor checks the user input and I want to pass the execution to another chain when an error occurs. But I do not want to call a laborious throw. any suggestions?

dominicm08:08:32

Why is it laborious to throw?

guliy08:08:14

there is an opinion that java throw exception is a heavy operation. And this is a potential attack vector on the service. Make sense?

dominicm08:08:48

I would suspect that it's not sufficiently expensive to be an avenue for DOS, but I have nothing to back that up besides its prevalence.

malcolmsparks08:08:10

Java exceptions used to be expensive to throw, on much older JVMs.

guliy08:08:26

You mean don’t worry about it?

malcolmsparks09:08:20

I wouldn't worry about it for performance reasons no