Packages

Scalactic is brought to you by:
c

org.scalactic.exceptions

NullArgumentException

class NullArgumentException 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 Requirements.

Source
NullArgumentException.scala
Linear Supertypes
IllegalArgumentException, RuntimeException, Exception, Throwable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NullArgumentException
  2. IllegalArgumentException
  3. RuntimeException
  4. Exception
  5. Throwable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new NullArgumentException(message: String)

    message

    the detail message

Value Members

  1. final def addSuppressed(arg0: Throwable): Unit
    Definition Classes
    Throwable
  2. def fillInStackTrace(): Throwable
    Definition Classes
    Throwable
  3. def getCause(): Throwable
    Definition Classes
    Throwable
  4. def getLocalizedMessage(): String
    Definition Classes
    Throwable
  5. def getMessage(): String
    Definition Classes
    Throwable
  6. def getStackTrace(): Array[StackTraceElement]
    Definition Classes
    Throwable
  7. final def getSuppressed(): Array[Throwable]
    Definition Classes
    Throwable
  8. def initCause(arg0: Throwable): Throwable
    Definition Classes
    Throwable
  9. def printStackTrace(arg0: PrintWriter): Unit
    Definition Classes
    Throwable
  10. def printStackTrace(arg0: PrintStream): Unit
    Definition Classes
    Throwable
  11. def printStackTrace(): Unit
    Definition Classes
    Throwable
  12. def setStackTrace(arg0: Array[StackTraceElement]): Unit
    Definition Classes
    Throwable
  13. def toString(): String
    Definition Classes
    Throwable → AnyRef → Any