code: public static int getErrorCode(Throwable t) {
      // Error codes and their explanations are described in
      // the Errno.java in jnr-constants
      if (t instanceof AlluxioException) {
        return getAlluxioErrorCode((AlluxioException) t);
      } else if (t instanceof IOException) {
        return -ErrorCodes.EIO();
      } else {
        return -ErrorCodes.EBADMSG();
      }
    }
docs: Gets the corresponding error code of a throwable.
  
  @param t throwable
  @return the corresponding error code