projects
/
mir.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
94c9fe5
)
another small exception-change
author
idfx
<idfx>
Thu, 9 May 2002 14:23:09 +0000
(14:23 +0000)
committer
idfx
<idfx>
Thu, 9 May 2002 14:23:09 +0000
(14:23 +0000)
source/mir/util/ParameterExpander.java
patch
|
blob
|
history
diff --git
a/source/mir/util/ParameterExpander.java
b/source/mir/util/ParameterExpander.java
index
bb677d7
..
63a2733
100755
(executable)
--- a/
source/mir/util/ParameterExpander.java
+++ b/
source/mir/util/ParameterExpander.java
@@
-1,5
+1,8
@@
package mir.util;
package mir.util;
+import multex.Failure;
+import multex.Exc;
+
import java.util.*;
public class ParameterExpander {
import java.util.*;
public class ParameterExpander {
@@
-49,7
+52,7
@@
public class ParameterExpander {
location = location + part;
if (node == null) {
location = location + part;
if (node == null) {
- throw new
Exception( "Can't expand key " + aKey + ": "+ location + " does not exist"
);
+ throw new
ParameterExpanderExc( "Can't expand key {1}: {2} does not exist", new Object[]{aKey,location}
);
}
}
}
}
@@
-58,7
+61,7
@@
public class ParameterExpander {
}
if (!(node instanceof String))
}
if (!(node instanceof String))
- throw new
Exception( "Can't expand key " + aKey + ": "+ location + " is not a string but a " + node.getClass().getName()
);
+ throw new
ParameterExpanderExc( "Can't expand key {1}: {2} is not a string but a {3}", new Object[]{aKey,location,node.getClass().getName()}
);
return (String) node;
}
return (String) node;
}
@@
-85,7
+88,7
@@
public class ParameterExpander {
previousPosition=endOfNamePosition+1;
}
else {
previousPosition=endOfNamePosition+1;
}
else {
-
throw new Exception("Missing } in " + anExpression
);
+
throw new ParameterExpanderExc("Missing } in {1}",new Object[]{anExpression}
);
}
}
else
}
}
else
@@
-99,6
+102,12
@@
public class ParameterExpander {
return result.toString();
}
return result.toString();
}
+
+ public static class ParameterExpanderExc extends Exc {
+ public ParameterExpanderExc(String msg, Object[] objects) {
+ super(msg, objects);
+ }
+ }
}
}