NullArgumentException

org.scalactic.exceptions.NullArgumentException
class NullArgumentException(message: String) extends IllegalArgumentException

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
Graph
Supertypes
class IllegalArgumentException
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

final def addSuppressed(x$0: Throwable): Unit

Attributes

Inherited from:
Throwable
def fillInStackTrace(): Throwable

Attributes

Inherited from:
Throwable
def getCause(): Throwable

Attributes

Inherited from:
Throwable
def getLocalizedMessage(): String

Attributes

Inherited from:
Throwable
def getMessage(): String

Attributes

Inherited from:
Throwable
def getStackTrace(): Array[StackTraceElement]

Attributes

Inherited from:
Throwable
final def getSuppressed(): Array[Throwable]

Attributes

Inherited from:
Throwable
def initCause(x$0: Throwable): Throwable

Attributes

Inherited from:
Throwable
def printStackTrace(x$0: PrintWriter): Unit

Attributes

Inherited from:
Throwable
def printStackTrace(x$0: PrintStream): Unit

Attributes

Inherited from:
Throwable
def printStackTrace(): Unit

Attributes

Inherited from:
Throwable
def setStackTrace(x$0: Array[StackTraceElement]): Unit

Attributes

Inherited from:
Throwable
def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Inherited from:
Throwable