本站源代码
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

16 lines
365B

  1. package jlexer
  2. import "fmt"
  3. // LexerError implements the error interface and represents all possible errors that can be
  4. // generated during parsing the JSON data.
  5. type LexerError struct {
  6. Reason string
  7. Offset int
  8. Data string
  9. }
  10. func (l *LexerError) Error() string {
  11. return fmt.Sprintf("parse error: %s near offset %d of '%s'", l.Reason, l.Offset, l.Data)
  12. }
上海开阖软件有限公司 沪ICP备12045867号-1