Sam
Sam

Reputation: 6618

Ignoring exception in oracle trigger

I have a table with some denormalized precalculated columns that are maintained by a trigger. The data sometimes is corrupted and the process fails but in these cases I need just ignore the exceptions and continue because it is not important to catch the error.

How can I write the exception clause to just go on without raising any error when an exception ocurrs?

I've tried just leaving the clause empty:

...
EXCEPTION
    WHEN OTHERS THEN


end test_trigger;

but it does not compile.

What am I missing? there is some "pass" clause that I should be including?

Upvotes: 14

Views: 16968

Answers (1)

cagcowboy
cagcowboy

Reputation: 30828

...
EXCEPTION
    WHEN OTHERS THEN
        NULL;

end test_trigger;

Upvotes: 28

Related Questions