diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/doc/html/page/Template.scala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala index 40e0ca930a..f296a932f4 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala @@ -425,7 +425,16 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { }</dd> } else NodeSeq.Empty - example ++ version ++ sinceVersion ++ note ++ seeAlso + val exceptions: Seq[scala.xml.Node] = + if(!comment.throws.isEmpty && !isReduced) { + <dt>Exceptions thrown</dt> + <dd>{ + val exceptionsXml: Iterable[scala.xml.NodeSeq] = (for(exception <- comment.throws ) yield <span class="cmt">{Text(exception._1) ++ bodyToHtml(exception._2)}</span> ) + exceptionsXml.reduceLeft(_ ++ Text("") ++ _) + }</dd> + } else NodeSeq.Empty + + example ++ version ++ sinceVersion ++ exceptions ++ note ++ seeAlso case None => NodeSeq.Empty } |