aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.sbt12
-rw-r--r--src/main/scala/firrtl/options/Exceptions.scala2
2 files changed, 14 insertions, 0 deletions
diff --git a/build.sbt b/build.sbt
index 9d741bdf..36aed369 100644
--- a/build.sbt
+++ b/build.sbt
@@ -136,6 +136,18 @@ lazy val publishSettings = Seq(
lazy val docSettings = Seq(
doc in Compile := (doc in ScalaUnidoc).value,
autoAPIMappings := true,
+ apiMappings ++= {
+ Option(System.getProperty("sun.boot.class.path")).flatMap { classPath =>
+ classPath.split(java.io.File.pathSeparator).find(_.endsWith(java.io.File.separator + "rt.jar"))
+ }.map { jarPath =>
+ Map(
+ file(jarPath) -> url("https://docs.oracle.com/javase/8/docs/api")
+ )
+ }.getOrElse {
+ streams.value.log.warn("Failed to add bootstrap class path of Java to apiMappings")
+ Map.empty[File,URL]
+ }
+ },
scalacOptions in Compile in doc ++= Seq(
"-diagrams",
"-diagrams-max-classes", "25",
diff --git a/src/main/scala/firrtl/options/Exceptions.scala b/src/main/scala/firrtl/options/Exceptions.scala
index 38b2f2e2..3773e156 100644
--- a/src/main/scala/firrtl/options/Exceptions.scala
+++ b/src/main/scala/firrtl/options/Exceptions.scala
@@ -11,6 +11,8 @@ class PhaseException(val message: String, cause: Throwable = null) extends Runti
/** Indicate an error related to a bad [[firrtl.annotations.Annotation Annotation]] or it's command line option
* equivalent. This exception is always caught and converted to an error message by a [[Stage]]. Do not use this for
* communicating generic exception information.
+ * @param message exception message [[scala.Predef.String String]]
+ * @param cause the reason for this exception (a Java [[java.lang.Throwable Throwable]])
*/
class OptionsException(val message: String, cause: Throwable = null) extends IllegalArgumentException(message, cause)