mirror of
https://github.com/sbt/sbt.git
synced 2026-10-06 18:14:04 +02:00
Problems:
1. Without a message, users don't find 'last'
2. Showing a message for every error clutters output.
This tries to address these issues by:
1. Only showing the message when other feedback has not been provided and
'last' would not usually be helpful. This will require ongoing tweaking.
For now, all commands except 'compile' display the message. 'update' could
omit the message as well, but perhaps knowing about 'last' might be
useful there.
2. Including the exact command to show the output:
last test:compile
and not just
last <task>
3. Highlighting the command in blue for visibility as an experiment.
Review by @ijuma and @retronym, please.
19 lines
865 B
Scala
19 lines
865 B
Scala
/* sbt -- Simple Build Tool
|
|
* Copyright 2011 Mark Harrah
|
|
*/
|
|
package sbt
|
|
|
|
final class MessageOnlyException(override val toString: String) extends RuntimeException(toString)
|
|
|
|
/** A dummy exception for the top-level exception handler to know that an exception
|
|
* has been handled, but is being passed further up to indicate general failure. */
|
|
final class AlreadyHandledException(val underlying: Throwable) extends RuntimeException
|
|
|
|
/** A marker trait for a top-level exception handler to know that this exception
|
|
* doesn't make sense to display. */
|
|
trait UnprintableException extends Throwable
|
|
|
|
/** A marker trait that refines UnprintableException to indicate to a top-level exception handler
|
|
* that the code throwing this exception has already provided feedback to the user about the error condition. */
|
|
trait FeedbackProvidedException extends UnprintableException
|