     commit;
     OPEN oResource FOR select * from cms_resources where resource_id = vNewResourceId;
   EXCEPTION
+    WHEN DUP_VAL_ON_INDEX THEN
+      rollback;
+      userErrors.raiseUserError(userErrors.C_FILE_EXISTS);  
     WHEN OTHERS THEN
       rollback;
       RAISE;

           sysdate, sysdate, 0, pUserId);
    commit;
  EXCEPTION
    WHEN OTHERS THEN
      rollback;
      RAISE;

                              where r.resource_id = vNewResourceId
                              and r.file_id = f.file_id(+);
  EXCEPTION
    WHEN DUP_VAL_ON_INDEX THEN
      rollback;
      userErrors.raiseUserError(userErrors.C_FILE_EXISTS);  
    WHEN OTHERS THEN
      rollback;
      RAISE;
