CONST_CONSTRUCTOR_THROWS_EXCEPTION constant

CompileTimeErrorCode const CONST_CONSTRUCTOR_THROWS_EXCEPTION

16.12.2 Const: It is a compile-time error if evaluation of a constant object results in an uncaught exception being thrown.

Implementation

static const CompileTimeErrorCode CONST_CONSTRUCTOR_THROWS_EXCEPTION =
    CompileTimeErrorCode('CONST_CONSTRUCTOR_THROWS_EXCEPTION',
        "Const constructors can't throw exceptions.",
        correction: "Try removing the throw statement, or "
            "removing the keyword 'const'.")