5 ms·
} catch (exception: Exception) { // log exception throw exception } Probably the most harmful snippet ever written. Every blog post about error
by valcron1000 11mo ago
} catch (exception: Exception) {
// log exception
throw exception
}
Probably the most harmful snippet ever written. Every blog post about errors has something similar written, regardless of the programming language. Please, don't write, suggest or even pretend that this should exist.
- another_twist 11mo agoWhats the problem ? Is throwing directly better here ? Given the annotations I presume this is spring so it will probably be logged anyway. So maybe its unnecessary here.