共用方式為


TemplateErrors class

集中式 LG 錯誤。

屬性

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

方法

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)

屬性詳細資料

emptyStrucContent

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

屬性值

string

extraExpressionInCondition

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

屬性值

string

extraExpressionInSwitchCase

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

屬性值

string

importFormatError

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

屬性值

string

invalidExpressionInCondition

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

屬性值

string

invalidExpressionInSwiathCase

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

屬性值

string

invalidMemory

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

屬性值

string

invalidMiddleInCondition

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

屬性值

string

invalidStatementInMiddlerOfSwitchCase

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

屬性值

string

invalidTemplateBody

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

屬性值

string

invalidTemplateNameType

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

屬性值

string

invalidWhitespaceInCondition

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

屬性值

string

invalidWhitespaceInSwitchCase

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

屬性值

string

loopDetected

static loopDetected: string = "Loop detected:"

屬性值

string

missingCaseInSwitchCase

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

屬性值

string

missingStrucEnd

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

屬性值

string

missingTemplateBodyInCondition

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

屬性值

string

missingTemplateBodyInSwitchCase

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

屬性值

string

multipleIfInCondition

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

屬性值

string

multipleSwithStatementInSwitchCase

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

屬性值

string

noCloseBracket

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

屬性值

string

noEndingInMultiline

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

屬性值

string

noTemplate

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

屬性值

string

notEndWithDefaultInSwitchCase

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

屬性值

string

notEndWithElseInCondition

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

屬性值

string

notStartWithIfInCondition

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

屬性值

string

notStartWithSwitchInSwitchCase

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

屬性值

string

staticFailure

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

屬性值

string

方法詳細資料

argumentMismatch(string, number, number)

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

參數

templateName

string

expectedCount

number

actualCount

number

傳回

string

duplicatedTemplateInDiffTemplate(string, string)

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

參數

templateName

string

source

string

傳回

string

duplicatedTemplateInSameTemplate(string)

static function duplicatedTemplateInSameTemplate(templateName: string): string

參數

templateName

string

傳回

string

errorExpression(string, string, string)

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

參數

refFullText

string

templateName

string

prefixText

string

傳回

string

expressionParseError(string)

static function expressionParseError(exp: string): string

參數

exp

string

傳回

string

invalidParameter(string)

static function invalidParameter(invalidParameter: string): string

參數

invalidParameter

string

傳回

string

invalidStrucBody(string)

static function invalidStrucBody(invalidBody: string): string

參數

invalidBody

string

傳回

string

invalidStrucName(string)

static function invalidStrucName(invalidName: string): string

參數

invalidName

string

傳回

string

invalidTemplateName(string)

static function invalidTemplateName(invalidTemplateName: string): string

參數

invalidTemplateName

string

傳回

string

noTemplateBody(string)

static function noTemplateBody(templateName: string): string

參數

templateName

string

傳回

string

nullExpression(string)

static function nullExpression(expression: string): string

參數

expression

string

傳回

string

syntaxError(string)

static function syntaxError(unexpectedContent: string): string

參數

unexpectedContent

string

傳回

string

templateExist(string)

static function templateExist(templateName: string): string

參數

templateName

string

傳回

string

templateNotExist(string)

static function templateNotExist(templateName: string): string

參數

templateName

string

傳回

string