top | item 45774374

(no title)

valcron1000 | 4 months 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.

discuss

order

another_twist|4 months ago

Whats 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.