trydrop laten loggen of er iets gedropt is

svn path=/Database/trunk/; revision=19142
This commit is contained in:
Jos Groot Lipman
2013-09-18 08:58:22 +00:00
parent 6cebf435df
commit 70ae42ede7

View File

@@ -58,12 +58,14 @@ AS
stmt := 'DROP ' || n;
EXECUTE IMMEDIATE stmt;
DBMS_OUTPUT.put_line ('Found, successfully dropped: ' || n);
EXCEPTION
WHEN OTHERS
THEN
IF SQLCODE IN (-942, -1418, -2289, -4043, -4080)
THEN
-- did not exist, voor table, view, index, sequence, object and trigger
DBMS_OUTPUT.put_line ('Not found, no need to drop: ' || n);
NULL;
ELSE
raise_application_error (-20001, 'Error trying to DROP ' || n || ': ' || SQLERRM);