From c2cd87ed50bf33e698bc61f7e3487f93136d2312 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 30 Jan 2011 22:06:06 -0800 Subject: [PATCH] Changed FilenameNotFoundException to FilenameResolutionException. --- ...undException.java => FilenameResolutionException.java} | 6 +++--- src/com/sk89q/worldedit/WorldEdit.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) rename src/com/sk89q/worldedit/{FilenameNotFoundException.java => FilenameResolutionException.java} (79%) diff --git a/src/com/sk89q/worldedit/FilenameNotFoundException.java b/src/com/sk89q/worldedit/FilenameResolutionException.java similarity index 79% rename from src/com/sk89q/worldedit/FilenameNotFoundException.java rename to src/com/sk89q/worldedit/FilenameResolutionException.java index 4dae4857a..2236adf07 100644 --- a/src/com/sk89q/worldedit/FilenameNotFoundException.java +++ b/src/com/sk89q/worldedit/FilenameResolutionException.java @@ -19,14 +19,14 @@ package com.sk89q.worldedit; -public class FilenameNotFoundException extends FilenameException { +public class FilenameResolutionException extends FilenameException { private static final long serialVersionUID = 4673670296313383121L; - public FilenameNotFoundException(String filename) { + public FilenameResolutionException(String filename) { super(filename); } - public FilenameNotFoundException(String filename, String msg) { + public FilenameResolutionException(String filename, String msg) { super(filename, msg); } } diff --git a/src/com/sk89q/worldedit/WorldEdit.java b/src/com/sk89q/worldedit/WorldEdit.java index 97e426efc..b1fd62d8d 100644 --- a/src/com/sk89q/worldedit/WorldEdit.java +++ b/src/com/sk89q/worldedit/WorldEdit.java @@ -429,13 +429,13 @@ public class WorldEdit { String dirPath = dir.getCanonicalPath(); if (!filePath.substring(0, dirPath.length()).equals(dirPath)) { - throw new FilenameNotFoundException(filename, + throw new FilenameResolutionException(filename, "Path is outside allowable root"); } return f; } catch (IOException e) { - throw new FilenameNotFoundException(filename, + throw new FilenameResolutionException(filename, "Failed to resolve path"); } } @@ -871,8 +871,8 @@ public class WorldEdit { } catch (InvalidFilenameException e) { player.printError("Filename '" + e.getFilename() + "' invalid: " + e.getMessage()); - } catch (FilenameNotFoundException e) { - player.printError("File '" + e.getFilename() + "' not found: " + } catch (FilenameResolutionException e) { + player.printError("File '" + e.getFilename() + "' resolution error: " + e.getMessage()); } catch (FileSelectionAbortedException e) { player.printError("File selection aborted.");