code: static <T> StreamSegmentException convertException(String segmentName, Throwable e) {
          if (e instanceof RemoteException) {
              e = ((RemoteException) e).unwrapRemoteException();
          }
  
          if (e instanceof PathNotFoundException || e instanceof FileNotFoundException) {
              return new StreamSegmentNotExistsException(segmentName, e);
          } else if (e instanceof FileAlreadyExistsException || e instanceof AlreadyBeingCreatedException) {
              return new StreamSegmentExistsException(segmentName, e);
          } else if (e instanceof AclException) {
              return new StreamSegmentSealedException(segmentName, e);
          } else {
              throw Exceptions.sneakyThrow(e);
          }
      }
docs: Translates HDFS specific Exceptions to Pravega-equivalent Exceptions.
  
  @param segmentName Name of the stream segment on which the exception occurs.
  @param e           The exception to be translated.
  @return  The exception to be thrown.