diff options
| author | Palmer Dabbelt | 2015-10-21 16:00:19 -0700 |
|---|---|---|
| committer | Palmer Dabbelt | 2015-10-21 16:00:19 -0700 |
| commit | 90bde8730fd71c3a5fc0b026064a4f1004e43d0f (patch) | |
| tree | 99b1e01d507e4d71f45e88d65d452bd65566a0bd /src/main/scala/Chisel/Error.scala | |
| parent | d40c0009383dc8c8d9c8514478a5b406a5e789a8 (diff) | |
| parent | cff13b54421095190314c724896842abf4dd2dc1 (diff) | |
Merge pull request #27 from ucb-bar/scalastyle-types
Add explicit types for public methods
Diffstat (limited to 'src/main/scala/Chisel/Error.scala')
| -rw-r--r-- | src/main/scala/Chisel/Error.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/scala/Chisel/Error.scala b/src/main/scala/Chisel/Error.scala index d9e6db6f..30f6b527 100644 --- a/src/main/scala/Chisel/Error.scala +++ b/src/main/scala/Chisel/Error.scala @@ -6,13 +6,13 @@ import scala.collection.mutable.ArrayBuffer class ChiselException(message: String, cause: Throwable) extends Exception(message, cause) private object throwException { - def apply(s: String, t: Throwable = null) = + def apply(s: String, t: Throwable = null): Nothing = throw new ChiselException(s, t) } /** Records and reports runtime errors and warnings. */ private class ErrorLog { - def hasErrors = errors.exists(_.isFatal) + def hasErrors: Boolean = errors.exists(_.isFatal) /** Log an error message */ def error(m: => String): Unit = @@ -75,14 +75,14 @@ private abstract class LogEntry(msg: => String, line: Option[StackTraceElement]) } private class Error(msg: => String, line: Option[StackTraceElement]) extends LogEntry(msg, line) { - override def isFatal = true - def format = tag("error", Console.RED) + override def isFatal: Boolean = true + def format: String = tag("error", Console.RED) } private class Warning(msg: => String, line: Option[StackTraceElement]) extends LogEntry(msg, line) { - def format = tag("warn", Console.YELLOW) + def format: String = tag("warn", Console.YELLOW) } private class Info(msg: => String, line: Option[StackTraceElement]) extends LogEntry(msg, line) { - def format = tag("info", Console.MAGENTA) + def format: String = tag("info", Console.MAGENTA) } |
