ThrowParserException() public static method

public static ThrowParserException ( String message ) : void
message String
return void
        private void ThrowExceptionForInvalidUTF8()
        {
            int start = _surrogatePairStart != -1 ? _surrogatePairStart : _charStart;

            Helpers.ThrowParserException(
                "partial character in source, but hit end near {0}",
                new String(_source, start, _source.Length - start)
                );
        }
        private char ReadUnicodeCodepoint()
        {
            uint codePoint;

            string hexCp = Encoding.ASCII.GetString(new byte[] {
                (byte)_source[_position++],
                (byte)_source[_position++],
                (byte)_source[_position++],
                (byte)_source[_position++],
            });

            if (!UInt32.TryParse(hexCp, System.Globalization.NumberStyles.HexNumber, System.Globalization.CultureInfo.InvariantCulture, out codePoint))
            {
                Helpers.ThrowParserException("Invalid Unicode codepoint: {0}", hexCp);
            }

            return((char)codePoint);
        }