Freigeben über


TemplateErrors class

Zentralisierte LG-Fehler.

Eigenschaften

emptyStrucContent
extraExpressionInCondition
extraExpressionInSwitchCase
importFormatError
invalidExpressionInCondition
invalidExpressionInSwiathCase
invalidMemory
invalidMiddleInCondition
invalidStatementInMiddlerOfSwitchCase
invalidTemplateBody
invalidTemplateNameType
invalidWhitespaceInCondition
invalidWhitespaceInSwitchCase
loopDetected
missingCaseInSwitchCase
missingStrucEnd
missingTemplateBodyInCondition
missingTemplateBodyInSwitchCase
multipleIfInCondition
multipleSwithStatementInSwitchCase
noCloseBracket
noEndingInMultiline
noTemplate
notEndWithDefaultInSwitchCase
notEndWithElseInCondition
notStartWithIfInCondition
notStartWithSwitchInSwitchCase
staticFailure

Methoden

argumentMismatch(string, number, number)
duplicatedTemplateInDiffTemplate(string, string)
duplicatedTemplateInSameTemplate(string)
errorExpression(string, string, string)
expressionParseError(string)
invalidParameter(string)
invalidStrucBody(string)
invalidStrucName(string)
invalidTemplateName(string)
noTemplateBody(string)
nullExpression(string)
syntaxError(string)
templateExist(string)
templateNotExist(string)

Details zur Eigenschaft

emptyStrucContent

static emptyStrucContent: string = "Invalid structure body. Body cannot be empty."

Eigenschaftswert

string

extraExpressionInCondition

static extraExpressionInCondition: string = "Invalid condition. 'ELSE' definition cannot include an expression."

Eigenschaftswert

string

extraExpressionInSwitchCase

static extraExpressionInSwitchCase: string = "Invalid condition. 'DEFAULT' statement cannot include an expression."

Eigenschaftswert

string

importFormatError

static importFormatError: string = "Import format should follow '[x](y)' or '[x](y) as z'."

Eigenschaftswert

string

invalidExpressionInCondition

static invalidExpressionInCondition: string = "Invalid condition. 'IF', 'ELSEIF' definitions must include a valid expression."

Eigenschaftswert

string

invalidExpressionInSwiathCase

static invalidExpressionInSwiathCase: string = "Invalid condition. 'SWITCH' and 'CASE' statements must include a valid expression."

Eigenschaftswert

string

invalidMemory

static invalidMemory: string = "Scope is not a LG customized memory."

Eigenschaftswert

string

invalidMiddleInCondition

static invalidMiddleInCondition: string = "Invalid template body. Expecting 'ELSEIF'."

Eigenschaftswert

string

invalidStatementInMiddlerOfSwitchCase

static invalidStatementInMiddlerOfSwitchCase: string = "Invalid template body. Expecting a 'CASE' statement."

Eigenschaftswert

string

invalidTemplateBody

static invalidTemplateBody: string = "Invalid template body. Expecting '-' prefix."

Eigenschaftswert

string

invalidTemplateNameType

static invalidTemplateNameType: string = "Expected string type for the parameter of template function."

Eigenschaftswert

string

invalidWhitespaceInCondition

static invalidWhitespaceInCondition: string = "Invalid condition: At most 1 whitespace allowed between 'IF/ELSEIF/ELSE' and ':'."

Eigenschaftswert

string

invalidWhitespaceInSwitchCase

static invalidWhitespaceInSwitchCase: string = "Invalid condition: At most 1 whitespace allowed between 'SWITCH/CASE/DEFAULT' and ':'."

Eigenschaftswert

string

loopDetected

static loopDetected: string = "Loop detected:"

Eigenschaftswert

string

missingCaseInSwitchCase

static missingCaseInSwitchCase: string = "Invalid template body. Expecting at least one 'CASE' statement."

Eigenschaftswert

string

missingStrucEnd

static missingStrucEnd: string = "Invalid structure body. Expecting ']' at the end of the body."

Eigenschaftswert

string

missingTemplateBodyInCondition

static missingTemplateBodyInCondition: string = "Invalid condition body. Conditions must include a valid body."

Eigenschaftswert

string

missingTemplateBodyInSwitchCase

static missingTemplateBodyInSwitchCase: string = "Invalid condition body. Expecing valid body inside a 'CASE' or 'DEFAULT' block."

Eigenschaftswert

string

multipleIfInCondition

static multipleIfInCondition: string = "Invalid template body. There cannot be more than one 'IF' condition. Expecting 'IFELSE' or 'ELSE' statement."

Eigenschaftswert

string

multipleSwithStatementInSwitchCase

static multipleSwithStatementInSwitchCase: string = "Invalid template body. There cannot be more than one 'SWITCH' statement. Expecting 'CASE' or 'DEFAULT' statement."

Eigenschaftswert

string

noCloseBracket

static noCloseBracket: string = "Close } is missing in Expression."

Eigenschaftswert

string

noEndingInMultiline

static noEndingInMultiline: string = "Expecting "```" to close the multi-line block."

Eigenschaftswert

string

noTemplate

static noTemplate: string = "LG file must have at least one template definition."

Eigenschaftswert

string

notEndWithDefaultInSwitchCase

static notEndWithDefaultInSwitchCase: string = "Conditional response template does not end with 'DEFAULT' condition."

Eigenschaftswert

string

notEndWithElseInCondition

static notEndWithElseInCondition: string = "Conditional response template does not end with 'ELSE' condition."

Eigenschaftswert

string

notStartWithIfInCondition

static notStartWithIfInCondition: string = "Invalid condition: Conditions must start with 'IF/ELSEIF/ELSE' prefix."

Eigenschaftswert

string

notStartWithSwitchInSwitchCase

static notStartWithSwitchInSwitchCase: string = "Invalid conditional response template. Expecting a 'SWITCH' statement?"

Eigenschaftswert

string

staticFailure

static staticFailure: string = "Static failure with the following error."

Eigenschaftswert

string

Details zur Methode

argumentMismatch(string, number, number)

static function argumentMismatch(templateName: string, expectedCount: number, actualCount: number): string

Parameter

templateName

string

expectedCount

number

actualCount

number

Gibt zurück

string

duplicatedTemplateInDiffTemplate(string, string)

static function duplicatedTemplateInDiffTemplate(templateName: string, source: string): string

Parameter

templateName

string

source

string

Gibt zurück

string

duplicatedTemplateInSameTemplate(string)

static function duplicatedTemplateInSameTemplate(templateName: string): string

Parameter

templateName

string

Gibt zurück

string

errorExpression(string, string, string)

static function errorExpression(refFullText: string, templateName: string, prefixText: string): string

Parameter

refFullText

string

templateName

string

prefixText

string

Gibt zurück

string

expressionParseError(string)

static function expressionParseError(exp: string): string

Parameter

exp

string

Gibt zurück

string

invalidParameter(string)

static function invalidParameter(invalidParameter: string): string

Parameter

invalidParameter

string

Gibt zurück

string

invalidStrucBody(string)

static function invalidStrucBody(invalidBody: string): string

Parameter

invalidBody

string

Gibt zurück

string

invalidStrucName(string)

static function invalidStrucName(invalidName: string): string

Parameter

invalidName

string

Gibt zurück

string

invalidTemplateName(string)

static function invalidTemplateName(invalidTemplateName: string): string

Parameter

invalidTemplateName

string

Gibt zurück

string

noTemplateBody(string)

static function noTemplateBody(templateName: string): string

Parameter

templateName

string

Gibt zurück

string

nullExpression(string)

static function nullExpression(expression: string): string

Parameter

expression

string

Gibt zurück

string

syntaxError(string)

static function syntaxError(unexpectedContent: string): string

Parameter

unexpectedContent

string

Gibt zurück

string

templateExist(string)

static function templateExist(templateName: string): string

Parameter

templateName

string

Gibt zurück

string

templateNotExist(string)

static function templateNotExist(templateName: string): string

Parameter

templateName

string

Gibt zurück

string