Don't throw exception away.
This commit is contained in:
@@ -47,7 +47,7 @@ public class DefaultPosixFile implements PosixFile {
|
|||||||
try {
|
try {
|
||||||
encodedName = file.getPath().getBytes(characterEncoding);
|
encodedName = file.getPath().getBytes(characterEncoding);
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
throw new NativeException(String.format("Could not encode path for file '%s' using encoding %s.", file.getName(), characterEncoding));
|
throw new NativeException(String.format("Could not encode path for file '%s' using encoding %s.", file.getName(), characterEncoding), e);
|
||||||
}
|
}
|
||||||
byte[] buffer = new byte[encodedName.length + 1];
|
byte[] buffer = new byte[encodedName.length + 1];
|
||||||
System.arraycopy(encodedName, 0, buffer, 0, encodedName.length);
|
System.arraycopy(encodedName, 0, buffer, 0, encodedName.length);
|
||||||
|
|||||||
Reference in New Issue
Block a user