Class JSONParserException

    • Constructor Detail

      • JSONParserException

        public JSONParserException​(@NotNull
                                   @NotNull JSONText source,
                                   @Nullable
                                   @Nullable StringRange location,
                                   @NotNull
                                   @NotNull JSONParserErrorHandlingOptions options,
                                   @NotNull
                                   @NotNull String msg)
        Instantiate this exception.
        Parameters:
        source - JSON text that has a problem
        location - location of the problem within the source JSON text
        options - options to change the error message format of this exception
        msg - error message which explains the problem
      • JSONParserException

        public JSONParserException​(@NotNull
                                   @NotNull JSONText source,
                                   @Nullable
                                   @Nullable StringLocation begin,
                                   @Nullable
                                   @Nullable StringLocation end,
                                   @NotNull
                                   @NotNull JSONParserErrorHandlingOptions options,
                                   @NotNull
                                   @NotNull String msg)
        Instantiate this exception.
        Parameters:
        source - JSON text that has a problem
        begin - beginning location of the problem within the source JSON text
        end - end location of the problem within the source JSON text
        options - options to change the error message format of this exception
        msg - error message which explains the problem
      • JSONParserException

        public JSONParserException​(@NotNull
                                   @NotNull JSONText source,
                                   @Nullable
                                   @Nullable StringLocation location,
                                   @NotNull
                                   @NotNull JSONParserErrorHandlingOptions options,
                                   @NotNull
                                   @NotNull String msg)
        Instantiate this exception.
        Parameters:
        source - JSON text that has a problem
        location - location of the problem within the source JSON text
        options - options to change the error message format of this exception
        msg - error message which explains the problem
    • Method Detail

      • source

        public JSONText source()
        Returns:
        the JSON text that cannot be tokenized properly.
      • location

        @Nullable
        public @Nullable StringRange location()
        Returns the location of the problem where the lexical analyzer failed to tokenize the given JSON text or the parse failed.
        Returns:
        beginning location of the problem within the source JSON text