function getParseErrorDescription()

in packages/core/src/lambda/config/templates.ts [215:252]


function getParseErrorDescription(code: jsonParser.ParseErrorCode): string {
    switch (code) {
        case jsonParser.ParseErrorCode.CloseBraceExpected:
            return 'close brace expected'
        case jsonParser.ParseErrorCode.CloseBracketExpected:
            return 'close bracket expected'
        case jsonParser.ParseErrorCode.ColonExpected:
            return 'colon expected'
        case jsonParser.ParseErrorCode.CommaExpected:
            return 'command expected'
        case jsonParser.ParseErrorCode.EndOfFileExpected:
            return 'end of file expected'
        case jsonParser.ParseErrorCode.InvalidCharacter:
            return 'invalid character'
        case jsonParser.ParseErrorCode.InvalidCommentToken:
            return 'invalid comment token'
        case jsonParser.ParseErrorCode.InvalidEscapeCharacter:
            return 'invalid escape character'
        case jsonParser.ParseErrorCode.InvalidNumberFormat:
            return 'invalid number format'
        case jsonParser.ParseErrorCode.InvalidSymbol:
            return 'invalid symbol'
        case jsonParser.ParseErrorCode.InvalidUnicode:
            return 'invalid unicode'
        case jsonParser.ParseErrorCode.PropertyNameExpected:
            return 'property name expected'
        case jsonParser.ParseErrorCode.UnexpectedEndOfComment:
            return 'unexpected end of comment'
        case jsonParser.ParseErrorCode.UnexpectedEndOfNumber:
            return 'unexpected end of number'
        case jsonParser.ParseErrorCode.UnexpectedEndOfString:
            return 'unexpected end of string'
        case jsonParser.ParseErrorCode.ValueExpected:
            return 'value expected'
        // By omitting the default case, we force the compiler to yell at us
        // if any enum members are added/removed/changed.
    }
}