coop.plausible

nx

package nx

Compile time exception validation

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. nx
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait CheckedExceptionConfig extends AnyRef

    Defines exception types to be considered "unchecked" by NX.

  2. class NonThrowAssertion[E <: Throwable] extends AnyRef

    May be applied to checked exception-throwing expressions to assert that the given exception is not thrown.

  3. class UncheckedExceptions extends Annotation with StaticAnnotation

    The UncheckedExceptions annotation disables NX exception checking within the given method or class.

Value Members

  1. object CheckedExceptionConfig

    Checked exception configurations supported by NX.

  2. def assertNonThrows[T <: Throwable]: NonThrowAssertion[T]

    Assert that the given checked exception T is not thrown by expr, excluding T from checked exception validation within.

    Assert that the given checked exception T is not thrown by expr, excluding T from checked exception validation within.

    Example usage:

    val result = assertNoThrows[UnknownHostException](java.net.InetAddress.getByName("127.0.0.1"))

    If the exception is thrown, it will be wrapped in a java.lang.AssertionError and rethrown.

    T

    The exception type to be asserted.

    returns

    A new NonThrowAssertion instance that may be applied to a checked exception throwing expression.

  3. def exceptionChecked[T](checked: CheckedExceptionConfig)(expr: T): T

    Scan expr for unhandled exception errors.

    Scan expr for unhandled exception errors. Compiler errors will be triggered for any unhandled exceptions.

    T

    The expression type.

    checked

    The checked exception configuration to be used when scanning expr.

    expr

    The expression to be scanned.

    returns

    The expression result, or a compiler error if the expression contained unchecked exceptions.

    Annotations
    @macroImpl( ... )
  4. def exceptionChecked[T](expr: T): T

    Scan expr for unhandled exception errors.

    Scan expr for unhandled exception errors. Compiler errors will be triggered for any unhandled exceptions.

    T

    The expression type.

    expr

    The expression to be scanned.

    returns

    The expression result, or a compiler error if the expression contained unchecked exceptions.

    Annotations
    @macroImpl( ... )
  5. package internal

Inherited from AnyRef

Inherited from Any

Ungrouped