org.rogach.scallop.exceptions

Type members

Classlikes

case class ExcessArguments(args: Seq[String]) extends ScallopException

Thrown when user provides excess arguments that can't be matched by trailing arg options.

Thrown when user provides excess arguments that can't be matched by trailing arg options.

object Exit

Extractor object, for matching on both Help and Version results.

Extractor object, for matching on both Help and Version results.

case class GenericScallopException(msg: String) extends ScallopException

Exception class for cases which didn't fit into other exception classes.

Exception class for cases which didn't fit into other exception classes.

case class Help(command: String) extends Exception with ScallopResult

Thrown when user requested help output (via "--help").

Thrown when user requested help output (via "--help").

case class IdenticalOptionNames(mess: String) extends ScallopException

Thrown when several options and/or trailing arguments have identical names in definition - making it impossible to distinguish between them.

Thrown when several options and/or trailing arguments have identical names in definition - making it impossible to distinguish between them.

case class IllegalOptionParameters(mess: String) extends ScallopException

Thrown when user tried to create an option with some illegal parameters - for example, with digit as the first character in opton name.

Thrown when user tried to create an option with some illegal parameters - for example, with digit as the first character in opton name.

Thrown when user tried to extract the value of an option before the call to verify in ScallopConf.

Thrown when user tried to extract the value of an option before the call to verify in ScallopConf.

This is a special case of exception - the one you should never see. If you actually saw it, there is a sure bug lurking somewhere. In such cases, please file a bug on project page!

This is a special case of exception - the one you should never see. If you actually saw it, there is a sure bug lurking somewhere. In such cases, please file a bug on project page!

case class OptionNameGuessingException(cause: Exception) extends ScallopException

Wrapper exception for cases when internal reflective mechanics fail

Wrapper exception for cases when internal reflective mechanics fail

Thrown when option name guessing fails on one of the options.

Thrown when option name guessing fails on one of the options.

Thrown when option name guessing is not available on the platform (currently JS and Native).

Thrown when option name guessing is not available on the platform (currently JS and Native).

case class OptionReaderFailure(mess: String) extends ScallopException

Thrown when option reader failed to read options from stdin or file.

Thrown when option reader failed to read options from stdin or file.

case class RequiredOptionNotFound(name: String) extends ScallopException

Thrown when parser failed to find arguments to option (marked as 'required') in the input arguments.

Thrown when parser failed to find arguments to option (marked as 'required') in the input arguments.

abstract class ScallopException(val message: String) extends Exception with ScallopResult

Parent class for all exceptions thrown from this library.

Parent class for all exceptions thrown from this library.

Companion
object

Extractor object, for matching on all exceptions.

Extractor object, for matching on all exceptions.

Companion
class
sealed trait ScallopResult

Parent trait for all not-positive results that can be resulted from this library (including help and exits)

Parent trait for all not-positive results that can be resulted from this library (including help and exits)

case class UnknownOption(optionName: String) extends ScallopException

Thrown when user provides Scallop with unknown option name in the arguments or requests unknown option result from parser.

Thrown when user provides Scallop with unknown option name in the arguments or requests unknown option result from parser.

case class ValidationFailure(mess: String) extends ScallopException

Thrown when the validation failed on some option.

Thrown when the validation failed on some option.

case object Version extends Exception with ScallopResult

Thrown when user requested version printout (via "--version").

Thrown when user requested version printout (via "--version").

case class WrongOptionFormat(optionName: String, args: String, msg: String) extends ScallopException

Thrown when arguments to some option do not satisfy that option's value converter (it returns Left in such case).

Thrown when arguments to some option do not satisfy that option's value converter (it returns Left in such case).