Lines Matching +full:- +full:error +full:- +full:asserts
1 // Protocol Buffers - Google's data interchange format
3 // https://developers.google.com/protocol-buffers/
33 * wire-format protocol buffers into Javascript data structures.
39 * Major caveat - Users of this library _must_ keep their Javascript proto
40 * parsing code in sync with the original .proto file - presumably you'll be
49 goog.require('goog.asserts');
58 * https://developers.google.com/protocol-buffers/docs/encoding.
62 * @param {number=} opt_length The optional length of the block to read -
69 * Wire-format decoder.
94 * Set to true if this reader encountered an error due to corrupt data.
100 * User-defined reader callbacks.
119 * @param {number=} opt_length The optional length of the block to read -
141 * @param {number=} opt_length The optional length of the block to read -
210 * @return {boolean} Whether the current wire type is an end-group tag. Used as
219 * Returns true if this reader hit an error due to corrupt data.
263 * Throws an error if we encountered a deprecated START_GROUP/END_GROUP field.
272 // If we hit an error decoding the previous field, stop now before we
275 goog.asserts.fail('Decoder hit an error');
294 goog.asserts.fail(
338 goog.asserts.fail('Invalid wire type for skipVarintField');
352 goog.asserts.fail('Invalid wire type for skipDelimitedField');
367 goog.asserts.fail('Invalid wire type for skipFixed32Field');
381 goog.asserts.fail('Invalid wire type for skipFixed64Field');
397 goog.asserts.fail('Unmatched start-group tag: stream EOF');
403 // Group end: check that it matches top-of-stack.
405 goog.asserts.fail('Unmatched end-group tag');
417 * Skips over the next field in the binary stream - this is useful if we're
438 goog.asserts.fail('Invalid wire encoding for field.');
444 * Registers a user-defined read callback.
453 goog.asserts.assert(!this.readCallbacks_[callbackName]);
464 goog.asserts.assert(this.readCallbacks_ !== null);
466 goog.asserts.assert(callback);
472 * Reads a field of any valid non-message type from the binary stream.
499 goog.asserts.fail('Group field type not supported in readAny()');
501 goog.asserts.fail('Message field type not supported in readAny()');
521 goog.asserts.fail('Invalid field type in readAny()');
530 * who is using manual deserialization instead of the code-generated versions.
536 goog.asserts.assert(
567 goog.asserts.assert(
570 goog.asserts.assert(this.nextField_ == field);
577 goog.asserts.fail('Group submessage did not end with an END_GROUP tag');
588 goog.asserts.assert(
603 * Reads a signed 32-bit integer field from the binary stream, or throws an
604 * error if the next field in the stream is not of the correct wire type.
606 * @return {number} The value of the signed 32-bit integer field.
609 goog.asserts.assert(
616 * Reads a signed 32-bit integer field from the binary stream, or throws an
617 * error if the next field in the stream is not of the correct wire type.
621 * @return {string} The value of the signed 32-bit integer field as a decimal
625 goog.asserts.assert(
632 * Reads a signed 64-bit integer field from the binary stream, or throws an
633 * error if the next field in the stream is not of the correct wire type.
635 * @return {number} The value of the signed 64-bit integer field.
638 goog.asserts.assert(
645 * Reads a signed 64-bit integer field from the binary stream, or throws an
646 * error if the next field in the stream is not of the correct wire type.
650 * @return {string} The value of the signed 64-bit integer field as a decimal
654 goog.asserts.assert(
661 * Reads an unsigned 32-bit integer field from the binary stream, or throws an
662 * error if the next field in the stream is not of the correct wire type.
664 * @return {number} The value of the unsigned 32-bit integer field.
667 goog.asserts.assert(
674 * Reads an unsigned 32-bit integer field from the binary stream, or throws an
675 * error if the next field in the stream is not of the correct wire type.
679 * @return {string} The value of the unsigned 32-bit integer field as a decimal
683 goog.asserts.assert(
690 * Reads an unsigned 64-bit integer field from the binary stream, or throws an
691 * error if the next field in the stream is not of the correct wire type.
693 * @return {number} The value of the unsigned 64-bit integer field.
696 goog.asserts.assert(
703 * Reads an unsigned 64-bit integer field from the binary stream, or throws an
704 * error if the next field in the stream is not of the correct wire type.
708 * @return {string} The value of the unsigned 64-bit integer field as a decimal
712 goog.asserts.assert(
719 * Reads a signed zigzag-encoded 32-bit integer field from the binary stream,
720 * or throws an error if the next field in the stream is not of the correct
723 * @return {number} The value of the signed 32-bit integer field.
726 goog.asserts.assert(
733 * Reads a signed zigzag-encoded 64-bit integer field from the binary stream,
734 * or throws an error if the next field in the stream is not of the correct
737 * @return {number} The value of the signed 64-bit integer field.
740 goog.asserts.assert(
747 * Reads a signed zigzag-encoded 64-bit integer field from the binary stream,
748 * or throws an error if the next field in the stream is not of the correct
751 * @return {string} The value of the signed 64-bit integer field as a decimal string.
754 goog.asserts.assert(
761 * Reads an unsigned 32-bit fixed-length integer fiield from the binary stream,
762 * or throws an error if the next field in the stream is not of the correct
768 goog.asserts.assert(
775 * Reads an unsigned 64-bit fixed-length integer fiield from the binary stream,
776 * or throws an error if the next field in the stream is not of the correct
782 goog.asserts.assert(
789 * Reads a signed 64-bit integer field from the binary stream as a string, or
790 * throws an error if the next field in the stream is not of the correct wire
795 * @return {string} The value of the unsigned 64-bit integer field as a decimal
799 goog.asserts.assert(
806 * Reads a signed 32-bit fixed-length integer fiield from the binary stream, or
807 * throws an error if the next field in the stream is not of the correct wire
810 * @return {number} The value of the signed 32-bit integer field.
813 goog.asserts.assert(
820 * Reads a signed 32-bit fixed-length integer fiield from the binary stream, or
821 * throws an error if the next field in the stream is not of the correct wire
824 * @return {string} The value of the signed 32-bit integer field as a decimal
828 goog.asserts.assert(
835 * Reads a signed 64-bit fixed-length integer fiield from the binary stream, or
836 * throws an error if the next field in the stream is not of the correct wire
842 goog.asserts.assert(
849 * Reads a signed 64-bit fixed-length integer fiield from the binary stream, or
850 * throws an error if the next field in the stream is not of the correct wire
858 goog.asserts.assert(
865 * Reads a 32-bit floating-point field from the binary stream, or throws an
866 * error if the next field in the stream is not of the correct wire type.
871 goog.asserts.assert(
878 * Reads a 64-bit floating-point field from the binary stream, or throws an
879 * error if the next field in the stream is not of the correct wire type.
884 goog.asserts.assert(
891 * Reads a boolean field from the binary stream, or throws an error if the next
897 goog.asserts.assert(
904 * Reads an enum field from the binary stream, or throws an error if the next
910 goog.asserts.assert(
917 * Reads a string field from the binary stream, or throws an error if the next
923 goog.asserts.assert(
931 * Reads a length-prefixed block of bytes from the binary stream, or returns
937 goog.asserts.assert(
945 * Reads a 64-bit varint or fixed64 field from the stream and returns it as an
946 * 8-character Unicode string for use as a hash table key, or throws an error
952 goog.asserts.assert(
959 * Reads an sint64 field from the stream and returns it as an 8-character
960 * Unicode string for use as a hash table key, or throws an error if the next
966 goog.asserts.assert(
973 * Reads a 64-bit varint field from the stream and invokes `convert` to produce
974 * the return value, or throws an error if the next field in the stream is not
983 goog.asserts.assert(
990 * Reads a 64-bit zig-zag varint field from the stream and invokes `convert` to
991 * produce the return value, or throws an error if the next field in the stream
1000 goog.asserts.assert(
1009 * Reads a 64-bit varint or fixed64 field from the stream and returns it as a
1010 * 8-character Unicode string for use as a hash table key, or throws an error
1016 goog.asserts.assert(
1023 * Reads a 64-bit fixed64 field from the stream and invokes `convert`
1024 * to produce the return value, or throws an error if the next field in the
1033 goog.asserts.assert(
1046 goog.asserts.assert(
1171 * of unsigned 32-bit ints.
1181 * of unsigned 64-bit ints.
1191 * of unsigned 64-bit ints. Returns a list of strings.
1201 * of 32-bit ints.
1211 * of 64-bit ints.
1221 * of 64-bit ints. Returns a list of strings.