code: private static int getAlluxioErrorCode(AlluxioException e) {
      try {
        throw e;
      } catch (FileDoesNotExistException ex) {
        return -ErrorCodes.ENOENT();
      } catch (FileAlreadyExistsException ex) {
        return -ErrorCodes.EEXIST();
      } catch (InvalidPathException ex) {
        return -ErrorCodes.EFAULT();
      } catch (BlockDoesNotExistException ex) {
        return -ErrorCodes.ENODATA();
      } catch (DirectoryNotEmptyException ex) {
        return -ErrorCodes.ENOTEMPTY();
      } catch (AccessControlException ex) {
        return -ErrorCodes.EACCES();
      } catch (ConnectionFailedException ex) {
        return -ErrorCodes.ECONNREFUSED();
      } catch (FileAlreadyCompletedException ex) {
        return -ErrorCodes.EOPNOTSUPP();
      } catch (AlluxioException ex) {
        return -ErrorCodes.EBADMSG();
      }
    }
docs: Gets the corresponding error code of an Alluxio exception.
  
  @param e an Alluxio exception
  @return the corresponding error code