summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2005-10-11 07:47:45 +0000
committerBurak Emir <emir@epfl.ch>2005-10-11 07:47:45 +0000
commitcc49e611aa8e50ce5028434f7bc51f0833067af7 (patch)
tree17b74507efc89ac833bbe3635c44d31e1592c8cd
parent4cb8dc8cc3b4c690db0c2caa8cb2605e37555fb6 (diff)
downloadscala-cc49e611aa8e50ce5028434f7bc51f0833067af7.tar.gz
scala-cc49e611aa8e50ce5028434f7bc51f0833067af7.tar.bz2
scala-cc49e611aa8e50ce5028434f7bc51f0833067af7.zip
rewrote message display
-rw-r--r--sources/scala/xml/dtd/ValidationException.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/sources/scala/xml/dtd/ValidationException.scala b/sources/scala/xml/dtd/ValidationException.scala
index 065fd401a3..337259ffb1 100644
--- a/sources/scala/xml/dtd/ValidationException.scala
+++ b/sources/scala/xml/dtd/ValidationException.scala
@@ -16,9 +16,14 @@ object MakeValidationException {
new ValidationException("attribute " + key +" not allowed here" );
def fromMissingAttribute( allKeys:scala.collection.Set[String] ) = {
- new ValidationException("missing value for REQUIRED attribute"+
- { if( allKeys.size > 1 ) "s" else "" }+
- allKeys );
+ val sb = new StringBuffer();
+ sb.append("missing value for REQUIRED attribute");
+ if( allKeys.size > 1 ) sb.append('s');
+ val it = allKeys.elements;
+ while (it.hasNext) {
+ sb.append('\'').append(it.next).append('\'')
+ }
+ new ValidationException(sb.toString());
}
def fromMissingAttribute( key: String, tpe: String ) = {