Пример #1
0
        internal static CloudRecordState CreateErrorStateFromCloudException(CloudException e, string errorId, object targetObject)
        {
            ErrorRecordState state       = CreateErrorStateFromHttpStatusCode(e.Response.StatusCode);
            ErrorRecord      er          = RemoteAppCollectionErrorState.CreateErrorRecordFromException(e, errorId, targetObject, state.Category);
            CloudRecordState cloudRecord = new CloudRecordState()
            {
                state = state,
                er    = er
            };

            return(cloudRecord);
        }
Пример #2
0
        private void HandleCloudException(object targetObject, CloudException e)
        {
            CloudRecordState cloudRecord = RemoteAppCollectionErrorState.CreateErrorStateFromCloudException(e, String.Empty, targetObject);

            if (cloudRecord.state.type == ExceptionType.NonTerminating)
            {
                WriteError(cloudRecord.er);
            }
            else
            {
                ThrowTerminatingError(cloudRecord.er);
            }
        }
Пример #3
0
        internal static CloudRecordState CreateErrorStateFromCloudException(CloudException e, string errorId, object targetObject)
        {
            ErrorRecordState state = CreateErrorStateFromHttpStatusCode(e.Response.StatusCode);
            ErrorRecord er = RemoteAppCollectionErrorState.CreateErrorRecordFromException(e, errorId, targetObject, state.Category);
            CloudRecordState cloudRecord = new CloudRecordState()
            {
                state = state,
                er = er
            };

            return cloudRecord;
        }