Compartir a través de


TemplateErrors class

Errores de LG centralizados.

Propiedades

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

Métodos

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)

Detalles de las propiedades

emptyStrucContent

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

Valor de propiedad

string

extraExpressionInCondition

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

Valor de propiedad

string

extraExpressionInSwitchCase

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

Valor de propiedad

string

importFormatError

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

Valor de propiedad

string

invalidExpressionInCondition

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

Valor de propiedad

string

invalidExpressionInSwiathCase

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

Valor de propiedad

string

invalidMemory

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

Valor de propiedad

string

invalidMiddleInCondition

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

Valor de propiedad

string

invalidStatementInMiddlerOfSwitchCase

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

Valor de propiedad

string

invalidTemplateBody

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

Valor de propiedad

string

invalidTemplateNameType

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

Valor de propiedad

string

invalidWhitespaceInCondition

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

Valor de propiedad

string

invalidWhitespaceInSwitchCase

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

Valor de propiedad

string

loopDetected

static loopDetected: string = "Loop detected:"

Valor de propiedad

string

missingCaseInSwitchCase

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

Valor de propiedad

string

missingStrucEnd

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

Valor de propiedad

string

missingTemplateBodyInCondition

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

Valor de propiedad

string

missingTemplateBodyInSwitchCase

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

Valor de propiedad

string

multipleIfInCondition

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

Valor de propiedad

string

multipleSwithStatementInSwitchCase

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

Valor de propiedad

string

noCloseBracket

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

Valor de propiedad

string

noEndingInMultiline

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

Valor de propiedad

string

noTemplate

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

Valor de propiedad

string

notEndWithDefaultInSwitchCase

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

Valor de propiedad

string

notEndWithElseInCondition

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

Valor de propiedad

string

notStartWithIfInCondition

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

Valor de propiedad

string

notStartWithSwitchInSwitchCase

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

Valor de propiedad

string

staticFailure

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

Valor de propiedad

string

Detalles del método

argumentMismatch(string, number, number)

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

Parámetros

templateName

string

expectedCount

number

actualCount

number

Devoluciones

string

duplicatedTemplateInDiffTemplate(string, string)

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

Parámetros

templateName

string

source

string

Devoluciones

string

duplicatedTemplateInSameTemplate(string)

static function duplicatedTemplateInSameTemplate(templateName: string): string

Parámetros

templateName

string

Devoluciones

string

errorExpression(string, string, string)

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

Parámetros

refFullText

string

templateName

string

prefixText

string

Devoluciones

string

expressionParseError(string)

static function expressionParseError(exp: string): string

Parámetros

exp

string

Devoluciones

string

invalidParameter(string)

static function invalidParameter(invalidParameter: string): string

Parámetros

invalidParameter

string

Devoluciones

string

invalidStrucBody(string)

static function invalidStrucBody(invalidBody: string): string

Parámetros

invalidBody

string

Devoluciones

string

invalidStrucName(string)

static function invalidStrucName(invalidName: string): string

Parámetros

invalidName

string

Devoluciones

string

invalidTemplateName(string)

static function invalidTemplateName(invalidTemplateName: string): string

Parámetros

invalidTemplateName

string

Devoluciones

string

noTemplateBody(string)

static function noTemplateBody(templateName: string): string

Parámetros

templateName

string

Devoluciones

string

nullExpression(string)

static function nullExpression(expression: string): string

Parámetros

expression

string

Devoluciones

string

syntaxError(string)

static function syntaxError(unexpectedContent: string): string

Parámetros

unexpectedContent

string

Devoluciones

string

templateExist(string)

static function templateExist(templateName: string): string

Parámetros

templateName

string

Devoluciones

string

templateNotExist(string)

static function templateNotExist(templateName: string): string

Parámetros

templateName

string

Devoluciones

string