Zum Hauptinhalt springen

ExchangeException

Namespace: Meshmakers.Octo.Runtime.Contracts.Exchange

Represents an exception that occurs during exchange operations.

public class ExchangeException : PersistenceException, ISerializable

Inheritance Object → Exception → PersistenceException → ExchangeException
Implements ISerializable

Properties​

MessageNumber​

The stable message number of the error, when the failure has one (for example 6384 for the blueprint-lock protection), otherwise null.

public Nullable<int> MessageNumber { get; private set; }

Property Value​

Nullable<Int32>

Messages​

The machine-readable parts of the failure: the messages (one per offending entity) with their parameters (rtId, ckTypeId, methodId, reason), when the failure has them, otherwise empty. Tools branch on ExchangeException.MessageNumber and these parameters, never on the text of Exception.Message.

public IReadOnlyList<OperationMessage> Messages { get; private set; }

Property Value​

IReadOnlyList<OperationMessage>

TargetSite​

public MethodBase TargetSite { get; }

Property Value​

MethodBase

Message​

public string Message { get; }

Property Value​

String

Data​

public IDictionary Data { get; }

Property Value​

IDictionary

InnerException​

public Exception InnerException { get; }

Property Value​

Exception

public string HelpLink { get; set; }

Property Value​

String

Source​

public string Source { get; set; }

Property Value​

String

HResult​

public int HResult { get; set; }

Property Value​

Int32

StackTrace​

public string StackTrace { get; }

Property Value​

String

Constructors​

ExchangeException()​

Initializes a new instance of the ExchangeException class with a default message.

public ExchangeException()

ExchangeException(String)​

Initializes a new instance of the ExchangeException class with a specified error message.

public ExchangeException(string message)

Parameters​

message String
Message that describes the error.

ExchangeException(String, Exception)​

Initializes a new instance of the ExchangeException class with a specified error message and a reference to the inner exception that is the cause of this exception.

public ExchangeException(string message, Exception inner)

Parameters​

message String
Message that describes the error.

inner Exception
Inner exception that is the cause of this exception.

ExchangeException(String, Int32)​

Initializes a new instance of the ExchangeException class with a message number.

public ExchangeException(string message, int messageNumber)

Parameters​

message String
Message that describes the error.

messageNumber Int32
Stable message number of the error.

Methods​

BlueprintLockedEntities(Int32, IReadOnlyList<String>)​

A user-initiated import would overwrite entities that are locked by a blueprint (opted-in types, ProtectBlueprintLocked). Raised before anything is written; lists every offender.

internal static Exception BlueprintLockedEntities(int messageNumber, IReadOnlyList<string> offenders)

Parameters​

messageNumber Int32

offenders IReadOnlyList<String>

Returns​

Exception

GenericCreateReplacedByMethod(IReadOnlyList<OperationMessage>)​

internal static Exception GenericCreateReplacedByMethod(IReadOnlyList<OperationMessage> offenders)

Parameters​

offenders IReadOnlyList<OperationMessage>

Returns​

Exception

AttributeWriteRestricted(IReadOnlyList<OperationMessage>)​

An import carries a value for an attribute that only a CK method may write (access: Hidden or MethodOnly). Raised before anything is written; one failure that lists every offender with its parameters (ckTypeId, attributePath, rtId).

internal static Exception AttributeWriteRestricted(IReadOnlyList<OperationMessage> offenders)

Parameters​

offenders IReadOnlyList<OperationMessage>

Returns​

Exception

RecordMemberNotPreservable(IReadOnlyList<OperationMessage>)​

A caller upsert writes a record array whose record has no usable record key while a stored element holds a value in a member that only a CK method may write; the elements cannot be matched, so the value would be lost. Raised before anything is written; parameters rtId, ckTypeId, path.

internal static Exception RecordMemberNotPreservable(IReadOnlyList<OperationMessage> offenders)

Parameters​

offenders IReadOnlyList<OperationMessage>

Returns​

Exception

IdentityOwnedWriteRestricted(IReadOnlyList<OperationMessage>)​

A user-initiated import sets an identity association (IdentityOwnedWrites), which only the identity service writes. Raised before anything is written; one failure that lists every offender with its parameters (rtId, ckTypeId, path).

internal static Exception IdentityOwnedWriteRestricted(IReadOnlyList<OperationMessage> offenders)

Parameters​

offenders IReadOnlyList<OperationMessage>

Returns​

Exception

TypeWriteAccessDenied(IReadOnlyList<OperationMessage>)​

A user-initiated import writes entities (or association edges) of a type whose writeAccess block does not admit the initiating caller. Raised before anything is written; one failure that lists every offender (message 144 with the type, the restricting type, the caller's principal kind and channel, and the admitted ones).

internal static Exception TypeWriteAccessDenied(IReadOnlyList<OperationMessage> offenders)

Parameters​

offenders IReadOnlyList<OperationMessage>

Returns​

Exception

AttributeNotFound<TKey>(RtCkId<CkAttributeId>, String, CkId<TKey>)​

internal static Exception AttributeNotFound<TKey>(RtCkId<CkAttributeId> modelAttributeId, string elementType, CkId<TKey> ckId)

Type Parameters​

TKey

Parameters​

modelAttributeId RtCkId<CkAttributeId>

elementType String

ckId CkId<TKey>

Returns​

Exception

MandatoryAttributesMissing(Int32, String)​

internal static Exception MandatoryAttributesMissing(int entityCount, string violationSummary)

Parameters​

entityCount Int32

violationSummary String

Returns​

Exception

CkEnumIdNotDefined(CkTypeAttributeGraph)​

internal static Exception CkEnumIdNotDefined(CkTypeAttributeGraph ckTypeAttributeGraph)

Parameters​

ckTypeAttributeGraph CkTypeAttributeGraph

Returns​

Exception

CkEnumIdNotFound(CkTypeAttributeGraph)​

internal static Exception CkEnumIdNotFound(CkTypeAttributeGraph typeAttributeGraph)

Parameters​

typeAttributeGraph CkTypeAttributeGraph

Returns​

Exception

CkEnumWithOutOfRange(CkTypeAttributeGraph, Object)​

internal static Exception CkEnumWithOutOfRange(CkTypeAttributeGraph typeAttributeGraph, object value)

Parameters​

typeAttributeGraph CkTypeAttributeGraph

value Object

Returns​

Exception

CkTypeNotResolvableForUpsert(String, String, Int32)​

An Upsert replaces the whole stored entity; without the stored entities the runtime state, the tenant-owned values and the creation stamp cannot be carried over, so the import stops instead of overwriting them with the seed (nothing was written).

internal static Exception CkTypeNotResolvableForUpsert(string tenantId, string ckTypeId, int entityCount)

Parameters​

tenantId String

ckTypeId String

entityCount Int32

Returns​

Exception

StoredStateNotReadable(String, String, Exception)​

internal static Exception StoredStateNotReadable(string tenantId, string ckTypeId, Exception innerException)

Parameters​

tenantId String

ckTypeId String

innerException Exception

Returns​

Exception

BulkImportError(Exception)​

internal static Exception BulkImportError(Exception innerException)

Parameters​

innerException Exception

Returns​

Exception

CkModelsMissing(String, ICollection<CkModelId>)​

internal static Exception CkModelsMissing(string tenantId, ICollection<CkModelId> ckModelIds)

Parameters​

tenantId String

ckModelIds ICollection<CkModelId>

Returns​

Exception

CkModelsMissing(String, ICollection<CkModelIdVersionRange>)​

internal static Exception CkModelsMissing(string tenantId, ICollection<CkModelIdVersionRange> ckModelIdRanges)

Parameters​

tenantId String

ckModelIdRanges ICollection<CkModelIdVersionRange>

Returns​

Exception