org.scalactic.exceptions

Members list

Type members

Classlikes

class NullArgumentException(message: String) extends IllegalArgumentException

Exception that indicates a passed argument was null.

Exception that indicates a passed argument was null.

Prior to ScalaTest and Scalactic 3.0.0, a null argument (where non-null was required) would result in a NullPointerException. Although throwing NullPointerException is the tradition in Java APIs, Scala.js does not support a NullPointerException. To make the behavior the same on both the JVM and Scala.js, the change to throwing NullArgumentException was made throughout the ScalaTest and Scalactic, including the requireNonNull method of trait <code>Requirements</code>.

Value parameters

message

the detail message

Attributes

Source
NullArgumentException.scala
Supertypes
class IllegalArgumentException
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class ValidationFailedException(errorMessage: String) extends Exception

Exception that indicates a validation failed.

Exception that indicates a validation failed.

This exception is used to indicate and describe a failed validation by the validating methods of <code>TrySugar</code> and <code>FutureSugar</code>.

Value parameters

errorMessage

a string describing the validation failure

Attributes

Source
ValidationFailedException.scala
Supertypes
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all