ConfigError

Description

static class Tinman.Core.Config.ConfigError

Provides factory methods for SemanticErrors that describe config errors.

Public / Methods

CannotResolveName


public static method CannotResolveName → (2)

node in : RangeI

The code range to use for error reporting.

name in : string

The identifier.

returns → SemanticError

The config error.

The given name identifier cannot be resolved.

CannotResolveType


public static method CannotResolveType → (2)

node in : RangeI

The code range to use for error reporting.

name in : string

The identifier.

returns → SemanticError

The config error.

The type of the given thing cannot be resolved.

ConstraintViolation


public static method ConstraintViolation → (3)

constraint in : ConfigExpression

The constraint expression.

value in : ConfigValue

The value for which constraint in has failed.

runtime in : bool

Is this a runtime error (see ParsingErrorType.Runtime)?

returns → SemanticError

The config error.

A constraint has failed.

ConversionMightFail


public static method ConversionMightFail → (3)

node in : ICodeRange

The code range to use for error reporting.

from in : ConfigType

The source config type.

to in : ConfigType

The target config type.

returns → SemanticError

The config warning.

A value conversion between non-assignable types might fail at runtime.

DuplicateMemberName


public static method DuplicateMemberName → (2)

node in : ICodeRange

The code range to use for error reporting.

name in : string

The member name that is used at least twice.

returns → SemanticError

The config error.

A duplicate member name has been found in a config type.

DuplicateParameterName


public static method DuplicateParameterName → (2)

node in : ICodeRange

The code range to use for error reporting.

name in : string

The parameter name that is used at least twice.

returns → SemanticError

The config error.

A duplicate parameter name has been found in a config function.

InvalidNumberOfArguments


public static method InvalidNumberOfArguments → (1)

node in : RangeI

The code range to use for error reporting.

returns → SemanticError

The config error.

An invalid number of arguments have been specified for a constructor or function call.

MustBeArrayType


public static method MustBeArrayType → (2)

node in : ICodeRange

The code range to use for error reporting.

type in : ConfigType

The type that is expected to be an array type.

returns → SemanticError

The config error.

The given type was expected to be an array type.

MustBeClassType


public static method MustBeClassType → (2)

node in : ICodeRange

The code range to use for error reporting.

type in : ConfigType

The type that is expected to be a class type.

returns → SemanticError

The config error.

The given type was expected to be a class type.

MustBeNullable


public static method MustBeNullable → (2)

node in : ICodeRange

The code range to use for error reporting.

type in : ConfigType

The type that is expected to be a class type.

returns → SemanticError

The config error.

The given type was expected to be a nullable type (ConfigType.CanBeNull).

NoSuchField


public static method NoSuchField → (3)

node in : RangeI

The code range to use for error reporting.

name in : string

Name of the field.

type in : ConfigType

The config type.

returns → SemanticError

The config error.

There is no field of the given name in the specified config type.

RequiredFieldNotSet


public static method RequiredFieldNotSet → (2)

node in : RangeI

The code range to use for error reporting.

field in : ConfigMember

[not-null]
The missing required field.

returns → SemanticError

The config error.

A required field of a config type has not been specified.

RequiredParametersExpectedFirst


public static method RequiredParametersExpectedFirst → (1)

node in : ICodeRange

The code range to use for error reporting.

returns → SemanticError

The config error.

All required function parameters must appear upfront in the parameter list.

TypeMismatch

2 overloads


public static method TypeMismatch1 → (3)

node in : ICodeRange

The code range to use for error reporting.

actual in : ConfigType

The actual config type.

expected in : ConfigType

The expected config type.

returns → SemanticError

The config error.

A different type has been found than the expected one.


public static method TypeMismatch2 → (4)

node in : ICodeRange

The code range to use for error reporting.

member in : ConfigMember

The config type member.

actual in : ConfigType

The actual config type.

expected in : ConfigType

The expected config type.

returns → SemanticError

The config error.

A different type has been found than the expected one.

TypeUnknown


public static method TypeUnknown → (2)

node in : RangeI

The code range to use for error reporting.

name opt : string = null

The unknown type name.

returns → SemanticError

The config error.

An unknown type has been found.