diff options
author | Burak Emir <emir@epfl.ch> | 2005-10-11 07:47:45 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2005-10-11 07:47:45 +0000 |
commit | cc49e611aa8e50ce5028434f7bc51f0833067af7 (patch) | |
tree | 17b74507efc89ac833bbe3635c44d31e1592c8cd /sources | |
parent | 4cb8dc8cc3b4c690db0c2caa8cb2605e37555fb6 (diff) | |
download | scala-cc49e611aa8e50ce5028434f7bc51f0833067af7.tar.gz scala-cc49e611aa8e50ce5028434f7bc51f0833067af7.tar.bz2 scala-cc49e611aa8e50ce5028434f7bc51f0833067af7.zip |
rewrote message display
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/xml/dtd/ValidationException.scala | 11 |
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 ) = { |