@Test public void createFileNotFoundException_withCause() { IOException cause = new IOException("cause exception"); FileNotFoundException e = createFileNotFoundException("bucket", "object", cause); assertThat(e).hasCauseThat().isSameInstanceAs(cause); }
public static FileNotFoundException createFileNotFoundException( String bucketName, String objectName, @Nullable IOException cause) { checkArgument(!isNullOrEmpty(bucketName), "bucketName must not be null or empty"); FileNotFoundException fileNotFoundException = new FileNotFoundException( String.format( "Item not found: '%s'. Note, it is possible that the live version" + " is still available but the requested generation is deleted.", StringPaths.fromComponents(bucketName, nullToEmpty(objectName)))); if (cause != null) { fileNotFoundException.initCause(cause); } return fileNotFoundException; }
GoogleCloudStorageExceptions { public static FileNotFoundException createFileNotFoundException( String bucketName, String objectName, @Nullable IOException cause) { checkArgument(!isNullOrEmpty(bucketName), "bucketName must not be null or empty"); FileNotFoundException fileNotFoundException = new FileNotFoundException( String.format( "Item not found: '%s'. Note, it is possible that the live version" + " is still available but the requested generation is deleted.", StringPaths.fromComponents(bucketName, nullToEmpty(objectName)))); if (cause != null) { fileNotFoundException.initCause(cause); } return fileNotFoundException; } }
GoogleCloudStorageExceptions { public static FileNotFoundException createFileNotFoundException( String bucketName, String objectName, @Nullable IOException cause) { checkArgument(!isNullOrEmpty(bucketName), "bucketName must not be null or empty"); FileNotFoundException fileNotFoundException = new FileNotFoundException( String.format( "Item not found: '%s'. Note, it is possible that the live version" + " is still available but the requested generation is deleted.", StringPaths.fromComponents(bucketName, nullToEmpty(objectName)))); if (cause != null) { fileNotFoundException.initCause(cause); } return fileNotFoundException; } private  GoogleCloudStorageExceptions(); }
GoogleCloudStorageExceptions { public static FileNotFoundException createFileNotFoundException( String bucketName, String objectName, @Nullable IOException cause) { checkArgument(!isNullOrEmpty(bucketName), "bucketName must not be null or empty"); FileNotFoundException fileNotFoundException = new FileNotFoundException( String.format( "Item not found: '%s'. Note, it is possible that the live version" + " is still available but the requested generation is deleted.", StringPaths.fromComponents(bucketName, nullToEmpty(objectName)))); if (cause != null) { fileNotFoundException.initCause(cause); } return fileNotFoundException; } private  GoogleCloudStorageExceptions(); static FileNotFoundException createFileNotFoundException(
      String bucketName, String objectName, @Nullable IOException cause); static FileNotFoundException createFileNotFoundException(
      StorageResourceId resourceId, @Nullable IOException cause); static IOException createCompositeException(Collection<IOException> innerExceptions); static GoogleJsonResponseException createJsonResponseException(
      GoogleJsonError e, HttpHeaders responseHeaders); }
GoogleCloudStorageExceptions { public static FileNotFoundException createFileNotFoundException( String bucketName, String objectName, @Nullable IOException cause) { checkArgument(!isNullOrEmpty(bucketName), "bucketName must not be null or empty"); FileNotFoundException fileNotFoundException = new FileNotFoundException( String.format( "Item not found: '%s'. Note, it is possible that the live version" + " is still available but the requested generation is deleted.", StringPaths.fromComponents(bucketName, nullToEmpty(objectName)))); if (cause != null) { fileNotFoundException.initCause(cause); } return fileNotFoundException; } private  GoogleCloudStorageExceptions(); static FileNotFoundException createFileNotFoundException(
      String bucketName, String objectName, @Nullable IOException cause); static FileNotFoundException createFileNotFoundException(
      StorageResourceId resourceId, @Nullable IOException cause); static IOException createCompositeException(Collection<IOException> innerExceptions); static GoogleJsonResponseException createJsonResponseException(
      GoogleJsonError e, HttpHeaders responseHeaders);  }