Skip to content

Commit 05d6ae4

Browse files
committed
Update the error identifiers [skip ci]
1 parent 1f3fc27 commit 05d6ae4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Sql.Cmdlets/Get-First.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected override void ProcessRecord() {
6363
WriteObject(record);
6464
}
6565
catch (TargetInvocationException e) {
66-
WriteError(new ErrorRecord(e.InnerException, "EmptyResultSet", ErrorCategory.InvalidOperation, null));
66+
WriteError(new ErrorRecord(e.InnerException, "GetFirst:TargetInvocation", ErrorCategory.InvalidOperation, null));
6767
WriteObject(null);
6868
}
6969
}

src/Sql.Cmdlets/Get-Scalar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected override void ProcessRecord() {
5656
WriteObject(value);
5757
}
5858
catch (TargetInvocationException e) {
59-
WriteError(new ErrorRecord(e.InnerException, "ScalarError", ErrorCategory.OperationStopped, null));
59+
WriteError(new ErrorRecord(e.InnerException, "GetScalar:TargetInvocation", ErrorCategory.OperationStopped, null));
6060
WriteObject(default);
6161
}
6262
}

src/Sql.Cmdlets/Get-Single.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected override void ProcessRecord() {
6363
WriteObject(record);
6464
}
6565
catch (TargetInvocationException e) {
66-
WriteError(new ErrorRecord(e.InnerException, "EmptyResultSetOrMoreThanOneRecord", ErrorCategory.InvalidOperation, null));
66+
WriteError(new ErrorRecord(e.InnerException, "GetSingle:TargetInvocation", ErrorCategory.InvalidOperation, null));
6767
WriteObject(null);
6868
}
6969
}

src/Sql.Cmdlets/Invoke-Query.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected override void ProcessRecord() {
6363
WriteObject(records, enumerateCollection: true);
6464
}
6565
catch (TargetInvocationException e) {
66-
WriteError(new ErrorRecord(e.InnerException, "QueryError", ErrorCategory.OperationStopped, null));
66+
WriteError(new ErrorRecord(e.InnerException, "InvokeQuery:TargetInvocation", ErrorCategory.OperationStopped, null));
6767
}
6868
}
6969
}

0 commit comments

Comments
 (0)