[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1756785227679483.jpg (42 KB, 618x597)
42 KB
42 KB JPG
>throwing custom Exceptions when validation fails

Do peepo still really?
>>
It just works.
>>
>>106470512
Why are exceptions bad again?
>>
>>106470512
I do this.
>>
>>106470658
They're heavyweight. That's fine if recovery isn't possible, in which case you want to capture and log as much data about what happened as possible. But if the exception is due to trying to insert a letter into integer storage, you really don't need all that overhead as the recovery pattern is to not do the insert and inform the user that they're retarded for entering crap. Also it makes it obvious to the developer that they were being lazy shits with input validation.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.