de.halcony.argparse.ParserExceptions.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala-argparse_2.13 Show documentation
Show all versions of scala-argparse_2.13 Show documentation
A re-imagined implementation of the handy python-argparse functionality for scala
package de.halcony.argparse
import scala.annotation.nowarn
class ParsingException(message: String, help: String) extends Exception {
override def getMessage: String = message
def getHelp: String = help
@nowarn
def getContextHelp: String = {
s"""$message
|
|$help
|""".stripMargin
}
}
class UnknownValue(message: String) extends Exception {
override def getMessage: String = message
}