general_manjago: (Default)
[personal profile] general_manjago


Ох, как же я ненавижу ковыряться в коде на PL/SQL, в котором встречаются конструкции типа
exception when others then return null! Хрен там в чем разберешься, если что-то пошло не так!

А недавно я просто впал в экстаз - там у чувака была гениальная функция
function Func return varchar2
is
begin
-- здесь что-то делается
exception when others then null
end;

А потом чувак написал что-то вроде

-- блок кода 1
select id into a from ... where field1 = Func
-- блок кода 2
exception when others then null;

В селекте возник-таки exception no_data_found, "блок кода 2" не выполнился - но пока мы до этого доперли....


Оригинал на http://www.itcommunity.ru/blogs/temnenkov/archive/2008/06/18/9868.aspx
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

April 2017

S M T W T F S
      1
234567 8
9101112131415
16171819202122
23242526272829
30      

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 21st, 2025 12:28 am
Powered by Dreamwidth Studios