-Поиск по дневнику

Поиск сообщений в rss_thedaily_wtf

 -Подписка по e-mail

 

 -Постоянные читатели

 -Статистика

Статистика LiveInternet.ru: показано количество хитов и посетителей
Создан: 06.04.2008
Записей:
Комментариев:
Написано: 0


CodeSOD: Caught Something

Четверг, 31 Марта 2022 г. 09:30 + в цитатник

One of the easiest ways to create a bug for yourself is to drop an empty catch into your application.

Today's rather short CodeSOD comes from Dex, and was found in a payment process. This is code that handles actual financial transactions, which is why the comment attached to a common mistake is relevant here:

catch // complete fubar but don't crash { }

And yes, when this exception happened, things were "fubar"- broken beyond all recognition, and unable to be recovered from. That's what drew Dex's attention to the code in the first place- trying to understand the mangled transactions which were passing through the system.

As Dex summarizes:

This combines a whole bunch of WTFs:

  1. Error suppression in payment processing code
  2. Try/catch in place of checking error conditions
  3. Willful laziness, as documented the coder's comment
[Advertisement] Utilize BuildMaster to release your software with confidence, at the pace your business demands. Download today!

https://thedailywtf.com/articles/caught-something

Метки:  

 

Добавить комментарий:
Текст комментария: смайлики

Проверка орфографии: (найти ошибки)

Прикрепить картинку:

 Переводить URL в ссылку
 Подписаться на комментарии
 Подписать картинку