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); }
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); } }
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; }