Sunday, July 28, 2019

UTL File All Exceptions

  UTL File All Exceptions
  
  WHEN UTL_FILE.INVALID_PATH THEN
    RAISE_APPLICATION_ERROR(-20100,'Invalid Path');

  WHEN UTL_FILE.INVALID_MODE THEN
    RAISE_APPLICATION_ERROR(-20101,'Invalid Mode');

  WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    RAISE_APPLICATION_ERROR(-20102,'Invalid Filehandle');

  WHEN UTL_FILE.INVALID_OPERATION THEN
    RAISE_APPLICATION_ERROR(-20103,'Invalid Operation -- May signal a file locked by the OS');

  WHEN UTL_FILE.READ_ERROR THEN
    RAISE_APPLICATION_ERROR(-20104,'Read Error');

  WHEN UTL_FILE.WRITE_ERROR THEN
    RAISE_APPLICATION_ERROR(-20105,'Write Error');

  WHEN UTL_FILE.INTERNAL_ERROR THEN
    RAISE_APPLICATION_ERROR(-20106,'Internal Error');

  WHEN UTL_FILE.CHARSETMISMATCH THEN
RAISE_APPLICATION_ERROR(-20107,'Characterset Mismatch error');

  WHEN UTL_FILE.FILE_OPEN THEN
RAISE_APPLICATION_ERROR(-20108,'Cannot perform the operation.File is open');

  WHEN UTL_FILE.INVALID_MAXLINESIZE THEN
RAISE_APPLICATION_ERROR(-20109,'Invalid Max line size');

  WHEN UTL_FILE.INVALID_FILENAME THEN
RAISE_APPLICATION_ERROR(-20110,'Invalid Filename');

  WHEN UTL_FILE.ACCESS_DENIED THEN
RAISE_APPLICATION_ERROR(-20111,'Access Denied');

  WHEN UTL_FILE.INVALID_OFFSET THEN
RAISE_APPLICATION_ERROR(-20112,'Invalid Offset');

  WHEN UTL_FILE.DELETE_FAILED THEN
RAISE_APPLICATION_ERROR(-20113,'File Delete failed');

  WHEN UTL_FILE.RENAME_FAILED THEN
RAISE_APPLICATION_ERROR(-20114,'File Rename failed');

  WHEN NO_DATA_FOUND THEN
    RAISE_APPLICATION_ERROR(-20115,'No Data Found');

  WHEN VALUE_ERROR THEN
    RAISE_APPLICATION_ERROR(-20116,'Value Error');

  WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR(-20117,'Unknown UTL_FILE Error');

No comments:

Post a Comment