mirror of https://github.com/sbt/sbt.git
Merge pull request #4016 from dwijnand/cleanup/Watched
Make Watched use State#handleError
This commit is contained in:
commit
fe418c92a7
|
|
@ -383,6 +383,8 @@ lazy val commandProj = (project in file("main-command"))
|
|||
// Replace nailgun socket stuff
|
||||
exclude[MissingClassProblem]("sbt.internal.NG*"),
|
||||
exclude[MissingClassProblem]("sbt.internal.ReferenceCountedFileDescriptor"),
|
||||
// made private[sbt] method private[this]
|
||||
exclude[DirectMissingMethodProblem]("sbt.State.handleException"),
|
||||
),
|
||||
unmanagedSources in (Compile, headerCreate) := {
|
||||
val old = (unmanagedSources in (Compile, headerCreate)).value
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ object State {
|
|||
|
||||
import ExceptionCategory._
|
||||
|
||||
private[sbt] def handleException(t: Throwable, s: State, log: Logger): State = {
|
||||
private[this] def handleException(t: Throwable, s: State, log: Logger): State = {
|
||||
ExceptionCategory(t) match {
|
||||
case AlreadyHandled => ()
|
||||
case m: MessageOnly => log.error(m.message)
|
||||
|
|
|
|||
|
|
@ -112,9 +112,9 @@ object Watched {
|
|||
(triggered, newWatchState)
|
||||
} catch {
|
||||
case e: Exception =>
|
||||
val log = s.log
|
||||
log.error("Error occurred obtaining files to watch. Terminating continuous execution...")
|
||||
State.handleException(e, s, log)
|
||||
s.log.error(
|
||||
"Error occurred obtaining files to watch. Terminating continuous execution...")
|
||||
s.handleError(e)
|
||||
(false, watchState)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue