Skip to content

Commit aa72785

Browse files
author
Klein Hu
committed
Fix line break ~80 columns.
1 parent 45e4a33 commit aa72785

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

src/ResourceManager/MachineLearning/Commands.MachineLearning/Cmdlets/WebServicesCmdletBase.cs

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ protected override void BeginProcessing()
8484
{
8585
if (this.IsFatalException(ex))
8686
{
87-
ThrowTerminatingError(new ErrorRecord(ex, string.Empty, ErrorCategory.InvalidOperation, this));
87+
ThrowTerminatingError(
88+
new ErrorRecord(
89+
ex,
90+
string.Empty,
91+
ErrorCategory.InvalidOperation,
92+
this));
8893
}
8994

9095
var capturedException = ExceptionDispatchInfo.Capture(ex);
@@ -102,7 +107,12 @@ protected override void EndProcessing()
102107
{
103108
if (this.IsFatalException(ex))
104109
{
105-
ThrowTerminatingError(new ErrorRecord(ex, string.Empty, ErrorCategory.InvalidOperation, this));
110+
ThrowTerminatingError(
111+
new ErrorRecord(
112+
ex,
113+
string.Empty,
114+
ErrorCategory.InvalidOperation,
115+
this));
106116
}
107117

108118
var capturedException = ExceptionDispatchInfo.Capture(ex);
@@ -197,7 +207,7 @@ private void HandleException(ExceptionDispatchInfo capturedException)
197207
var cloudException = capturedException.SourceException as CloudException;
198208
if (cloudException != null)
199209
{
200-
errorRecord = this.CreateErrorRecordForCloudException(cloudException); ////new ErrorRecord(cloudException, cloudException.Message, ErrorCategory.CloseError, null);
210+
errorRecord = this.CreateErrorRecordForCloudException(cloudException);
201211
}
202212
else
203213
{
@@ -221,12 +231,20 @@ private void HandleException(ExceptionDispatchInfo capturedException)
221231
}
222232
else
223233
{
224-
errorRecord = new ErrorRecord(aggregateException.InnerException, aggregateException.InnerException.Message, ErrorCategory.CloseError, null);
234+
errorRecord = new ErrorRecord(
235+
aggregateException.InnerException,
236+
aggregateException.InnerException.Message,
237+
ErrorCategory.CloseError,
238+
null);
225239
}
226240
}
227241
else
228242
{
229-
errorRecord = new ErrorRecord(capturedException.SourceException, capturedException.SourceException.Message, ErrorCategory.CloseError, null);
243+
errorRecord = new ErrorRecord(
244+
capturedException.SourceException,
245+
capturedException.SourceException.Message,
246+
ErrorCategory.CloseError,
247+
null);
230248
}
231249
}
232250
}
@@ -270,7 +288,10 @@ private ErrorRecord CreateErrorRecordForCloudException(CloudException cloudExcep
270288
errorReport.AppendLine("Error Details:");
271289
foreach (var errorDetail in cloudException.Body.Details)
272290
{
273-
errorReport.AppendLine("\t[Code={0}, Message={1}]".FormatInvariant(errorDetail.Code, errorDetail.Message));
291+
errorReport.AppendLine(
292+
"\t[Code={0}, Message={1}]".FormatInvariant(
293+
errorDetail.Code,
294+
errorDetail.Message));
274295
}
275296
}
276297

0 commit comments

Comments
 (0)