C# Class MsgPack.Serialization.SerializationExceptions

显示文件 Open project: msgpack/msgpack-cli Class Usage Examples

Public Methods

Method Description
NewCreateInstanceIsNotSupported ( Type targetType ) : Exception

Returns a new exception which represents UnpackFrom is not supported in this asymmetric serializer.

NewFailedToDeserializeMember ( Type targetType, string memberName, Exception inner ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that it is failed to deserialize member.

NewIsIncorrectStream ( Exception innerException ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the underlying stream is not correct semantically because failed to unpack items count of array/map.

NewIsTooLargeCollection ( ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the unpacking collection is too large to represents in the current runtime environment.

NewMissingAddMethod ( Type type ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that target collection type does not declare appropriate Add(T) method.

NewMissingProperty ( string name ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that required field is not found on the unpacking stream.

NewNotSupportedBecauseCannotInstanciateAbstractType ( Type type ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that operation is not supported because type cannot be instanciated.

NewNullIsProhibited ( string memberName ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the member cannot be null or the unpacking value cannot be nil because nil value is explicitly prohibitted.

NewReadOnlyMemberItemsMustNotBeNull ( string memberName ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the unpacking value cannot be nil because the target member is read only and its type is collection.

NewStreamDoesNotContainCollectionForMember ( string memberName ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the unpacking collection value is not a collection.

NewTypeCannotDeserialize ( Type type ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot deserialize.

NewTypeCannotDeserialize ( Type type, string memberName, Exception inner ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot deserialize.

NewTypeCannotSerialize ( Type type ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot serialize.

NewUnexpectedArrayLength ( int expectedLength, int actualLength ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the unpacking array size is not expected length.

NewUnpackFromIsNotSupported ( Type targetType ) : Exception

Returns a new exception which represents UnpackFrom is not supported in this asymmetric serializer.

NewValueTypeCannotBeNull ( Type type ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot be null on deserialization.

NewValueTypeCannotBeNull ( string name, Type memberType, Type declaringType ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot be null on deserialization.

ThrowIsNotArrayHeader ( Unpacker unpacker ) : void

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that unpacker is not in the array header, that is the state is invalid.

ThrowIsNotMapHeader ( Unpacker unpacker ) : void

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that unpacker is not in the map header, that is the state is invalid.

ThrowMissingItem ( int index, Unpacker unpacker ) : void

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws a exception to notify that item is not found on the unpacking stream.

ThrowMissingItem ( int index, string name, Unpacker unpacker ) : void

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws a exception to notify that item is not found on the unpacking stream.

ThrowNullIsProhibited ( string memberName ) : void

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that the member cannot be null or the unpacking value cannot be nil because nil value is explicitly prohibitted.

ThrowTupleCardinarityIsNotMatch ( int expectedTupleCardinality, long actualArrayLength, Unpacker unpacker ) : void

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that the array length does not match to expected tuple cardinality.

ThrowValueTypeCannotBeNull ( string name, Type memberType, Type declaringType ) : void

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that value type cannot be null on deserialization.

Private Methods

Method Description
NewIncompatibleCollectionSerializer ( Type targetType, Type incompatibleType, Type exampleClass ) : Exception
NewIsNotArrayHeader ( ) : Exception
NewIsNotMapHeader ( ) : Exception
NewMissingItem ( int index ) : Exception
NewTargetDoesNotHavePublicDefaultConstructor ( Type type ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that target type is not serializable because it does not have public default constructor.

NewTargetDoesNotHavePublicDefaultConstructorNorInitialCapacity ( Type type ) : Exception

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that target type is not serializable because it does not have both of public default constructor and public constructor with an Int32 parameter.

NewTupleCardinarityIsNotMatch ( int expectedTupleCardinality, int actualArrayLength ) : Exception
NewUnexpectedEndOfStream ( ) : Exception
NewUnknownTypeEmbedding ( ) : Exception
NewUnpackToIsNotSupported ( Type type, Exception inner ) : Exception
NewValueTypeCannotBePolymorphic ( Type type ) : Exception
ThrowArgumentCannotBeNegativeException ( string parameterName ) : void
ThrowArgumentCannotBeNegativeException ( string parameterName, string fieldName ) : void
ThrowArgumentException ( string parameterName, string message ) : void
ThrowArgumentNullException ( string parameterName ) : void
ThrowArgumentNullException ( string parameterName, string fieldName ) : void
ThrowFailedToDeserializeMember ( Type targetType, string memberName, Exception inner ) : void

Throws an exception to notify that it is failed to deserialize member.

ThrowInvalidArrayItemsCount ( Unpacker unpacker, Type targetType, int requiredCount ) : void
ThrowIsIncorrectStream ( Exception innerException ) : void
ThrowIsTooLargeCollection ( ) : void
ThrowMissingKey ( int index, Unpacker unpacker ) : void
ThrowMissingProperty ( string name ) : void
ThrowSerializationException ( string message ) : void
ThrowSerializationException ( string message, Exception innerException ) : void
ThrowTargetDoesNotHavePublicDefaultConstructorNorInitialCapacity ( Type type ) : void
ThrowUnexpectedEndOfStream ( Unpacker unpacker ) : void

Method Details

NewCreateInstanceIsNotSupported() public static method

Returns a new exception which represents UnpackFrom is not supported in this asymmetric serializer.
public static NewCreateInstanceIsNotSupported ( Type targetType ) : Exception
targetType System.Type Deserializing type.
return System.Exception

NewFailedToDeserializeMember() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that it is failed to deserialize member.
public static NewFailedToDeserializeMember ( Type targetType, string memberName, Exception inner ) : Exception
targetType System.Type Deserializing type.
memberName string The name of the deserializing member.
inner System.Exception The exception which caused current error.
return System.Exception

NewIsIncorrectStream() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the underlying stream is not correct semantically because failed to unpack items count of array/map.
public static NewIsIncorrectStream ( Exception innerException ) : Exception
innerException System.Exception The inner exception for the debug. The value is implementation specific.
return System.Exception

NewIsTooLargeCollection() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the unpacking collection is too large to represents in the current runtime environment.
public static NewIsTooLargeCollection ( ) : Exception
return System.Exception

NewMissingAddMethod() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that target collection type does not declare appropriate Add(T) method.
public static NewMissingAddMethod ( Type type ) : Exception
type System.Type The target type.
return System.Exception

NewMissingProperty() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that required field is not found on the unpacking stream.
public static NewMissingProperty ( string name ) : Exception
name string The name of the property.
return System.Exception

NewNotSupportedBecauseCannotInstanciateAbstractType() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that operation is not supported because type cannot be instanciated.
public static NewNotSupportedBecauseCannotInstanciateAbstractType ( Type type ) : Exception
type System.Type Type.
return System.Exception

NewNullIsProhibited() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the member cannot be null or the unpacking value cannot be nil because nil value is explicitly prohibitted.
public static NewNullIsProhibited ( string memberName ) : Exception
memberName string The name of the member.
return System.Exception

NewReadOnlyMemberItemsMustNotBeNull() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the unpacking value cannot be nil because the target member is read only and its type is collection.
public static NewReadOnlyMemberItemsMustNotBeNull ( string memberName ) : Exception
memberName string The name of the member.
return System.Exception

NewStreamDoesNotContainCollectionForMember() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the unpacking collection value is not a collection.
public static NewStreamDoesNotContainCollectionForMember ( string memberName ) : Exception
memberName string The name of the member.
return System.Exception

NewTypeCannotDeserialize() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot deserialize.
public static NewTypeCannotDeserialize ( Type type ) : Exception
type System.Type The target type.
return System.Exception

NewTypeCannotDeserialize() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot deserialize.
public static NewTypeCannotDeserialize ( Type type, string memberName, Exception inner ) : Exception
type System.Type The target type.
memberName string The name of deserializing member.
inner System.Exception The inner exception.
return System.Exception

NewTypeCannotSerialize() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot serialize.
public static NewTypeCannotSerialize ( Type type ) : Exception
type System.Type The target type.
return System.Exception

NewUnexpectedArrayLength() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that the unpacking array size is not expected length.
public static NewUnexpectedArrayLength ( int expectedLength, int actualLength ) : Exception
expectedLength int Expected, required for deserialization array length.
actualLength int Actual array length.
return System.Exception

NewUnpackFromIsNotSupported() public static method

Returns a new exception which represents UnpackFrom is not supported in this asymmetric serializer.
public static NewUnpackFromIsNotSupported ( Type targetType ) : Exception
targetType System.Type Deserializing type.
return System.Exception

NewValueTypeCannotBeNull() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot be null on deserialization.
public static NewValueTypeCannotBeNull ( Type type ) : Exception
type System.Type The target type.
return System.Exception

NewValueTypeCannotBeNull() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Returns new exception to notify that value type cannot be null on deserialization.
public static NewValueTypeCannotBeNull ( string name, Type memberType, Type declaringType ) : Exception
name string The name of the member.
memberType System.Type The type of the member.
declaringType System.Type The type that declares the member.
return System.Exception

ThrowIsNotArrayHeader() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that unpacker is not in the array header, that is the state is invalid.
Always thrown.
public static ThrowIsNotArrayHeader ( Unpacker unpacker ) : void
unpacker Unpacker The unpacker for pretty message.
return void

ThrowIsNotMapHeader() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that unpacker is not in the map header, that is the state is invalid.
Always thrown.
public static ThrowIsNotMapHeader ( Unpacker unpacker ) : void
unpacker Unpacker The unpacker for pretty message.
return void

ThrowMissingItem() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws a exception to notify that item is not found on the unpacking stream.
Always thrown.
public static ThrowMissingItem ( int index, Unpacker unpacker ) : void
index int The index to be unpacking.
unpacker Unpacker The unpacker for pretty message.
return void

ThrowMissingItem() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws a exception to notify that item is not found on the unpacking stream.
Always thrown.
public static ThrowMissingItem ( int index, string name, Unpacker unpacker ) : void
index int The index to be unpacking.
name string The name of the item to be unpacking.
unpacker Unpacker The unpacker for pretty message.
return void

ThrowNullIsProhibited() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that the member cannot be null or the unpacking value cannot be nil because nil value is explicitly prohibitted.
Always thrown.
public static ThrowNullIsProhibited ( string memberName ) : void
memberName string The name of the member.
return void

ThrowTupleCardinarityIsNotMatch() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that the array length does not match to expected tuple cardinality.
Always thrown.
public static ThrowTupleCardinarityIsNotMatch ( int expectedTupleCardinality, long actualArrayLength, Unpacker unpacker ) : void
expectedTupleCardinality int The expected cardinality of the tuple.
actualArrayLength long The actual serialized array length.
unpacker Unpacker The unpacker for pretty message.
return void

ThrowValueTypeCannotBeNull() public static method

This is intended to MsgPack for CLI internal use. Do not use this type from application directly. Throws an exception to notify that value type cannot be null on deserialization.
Always thrown.
public static ThrowValueTypeCannotBeNull ( string name, Type memberType, Type declaringType ) : void
name string The name of the member.
memberType System.Type The type of the member.
declaringType System.Type The type that declares the member.
return void