Package

copla

util

Permalink

package util

Visibility
  1. Public
  2. All

Value Members

  1. object exception

    Permalink

    Provides a flexible assertion support, related to a debug level.

    Provides a flexible assertion support, related to a debug level.

    DEBUG_LEVEL == 1, should be suitable for a release version of the software, with inexpensive sanity checks. DEBUG_LEVEL 2 and 3, encompass more expensive sanity checks that should only be made in debug mode. DEBUG_LEVEL 4 is reserved to very expensive computation that should never be used except beside development.

    Default debug level is 3 when java assertions are enabled (VM option "-ea") and 1 otherwise.

    All assert methods have lazy evaluation of the all parameters, so invocation should be almost for free when above the current DEBUG_LEVEL.

    Assertion can be remove at compile time with "-Xelide-below" parameter to scalac.

Ungrouped