3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-10 05:20:04 +01:00

Changed FilenameNotFoundException to FilenameResolutionException.

Dieser Commit ist enthalten in:
sk89q 2011-01-30 22:06:06 -08:00
Ursprung ee9b50264e
Commit c2cd87ed50
2 geänderte Dateien mit 7 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -19,14 +19,14 @@
package com.sk89q.worldedit; package com.sk89q.worldedit;
public class FilenameNotFoundException extends FilenameException { public class FilenameResolutionException extends FilenameException {
private static final long serialVersionUID = 4673670296313383121L; private static final long serialVersionUID = 4673670296313383121L;
public FilenameNotFoundException(String filename) { public FilenameResolutionException(String filename) {
super(filename); super(filename);
} }
public FilenameNotFoundException(String filename, String msg) { public FilenameResolutionException(String filename, String msg) {
super(filename, msg); super(filename, msg);
} }
} }

Datei anzeigen

@ -429,13 +429,13 @@ public class WorldEdit {
String dirPath = dir.getCanonicalPath(); String dirPath = dir.getCanonicalPath();
if (!filePath.substring(0, dirPath.length()).equals(dirPath)) { if (!filePath.substring(0, dirPath.length()).equals(dirPath)) {
throw new FilenameNotFoundException(filename, throw new FilenameResolutionException(filename,
"Path is outside allowable root"); "Path is outside allowable root");
} }
return f; return f;
} catch (IOException e) { } catch (IOException e) {
throw new FilenameNotFoundException(filename, throw new FilenameResolutionException(filename,
"Failed to resolve path"); "Failed to resolve path");
} }
} }
@ -871,8 +871,8 @@ public class WorldEdit {
} catch (InvalidFilenameException e) { } catch (InvalidFilenameException e) {
player.printError("Filename '" + e.getFilename() + "' invalid: " player.printError("Filename '" + e.getFilename() + "' invalid: "
+ e.getMessage()); + e.getMessage());
} catch (FilenameNotFoundException e) { } catch (FilenameResolutionException e) {
player.printError("File '" + e.getFilename() + "' not found: " player.printError("File '" + e.getFilename() + "' resolution error: "
+ e.getMessage()); + e.getMessage());
} catch (FileSelectionAbortedException e) { } catch (FileSelectionAbortedException e) {
player.printError("File selection aborted."); player.printError("File selection aborted.");