mirror of
https://github.com/androidx/media.git
synced 2025-05-11 09:39:52 +08:00
Set cause of the exceptions in AtomicFile.startWrite()
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=173388899
This commit is contained in:
parent
3c201a0491
commit
8b3ec4800c
@ -104,12 +104,12 @@ public final class AtomicFile {
|
||||
} catch (FileNotFoundException e) {
|
||||
File parent = baseName.getParentFile();
|
||||
if (!parent.mkdirs()) {
|
||||
throw new IOException("Couldn't create directory " + baseName);
|
||||
throw new IOException("Couldn't create directory " + baseName, e);
|
||||
}
|
||||
try {
|
||||
str = new AtomicFileOutputStream(baseName);
|
||||
} catch (FileNotFoundException e2) {
|
||||
throw new IOException("Couldn't create " + baseName);
|
||||
throw new IOException("Couldn't create " + baseName, e2);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
|
Loading…
x
Reference in New Issue
Block a user