Skip to content

Commit 33e4cda

Browse files
committed
split out exceptions into generic file
1 parent b2beb22 commit 33e4cda

File tree

2 files changed

+41
-34
lines changed

2 files changed

+41
-34
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
namespace Microsoft.PowerShell.EditorServices.Refactoring
6+
{
7+
8+
public class TargetSymbolNotFoundException : Exception
9+
{
10+
public TargetSymbolNotFoundException()
11+
{
12+
}
13+
14+
public TargetSymbolNotFoundException(string message)
15+
: base(message)
16+
{
17+
}
18+
19+
public TargetSymbolNotFoundException(string message, Exception inner)
20+
: base(message, inner)
21+
{
22+
}
23+
}
24+
25+
public class TargetVariableIsDotSourcedException : Exception
26+
{
27+
public TargetVariableIsDotSourcedException()
28+
{
29+
}
30+
31+
public TargetVariableIsDotSourcedException(string message)
32+
: base(message)
33+
{
34+
}
35+
36+
public TargetVariableIsDotSourcedException(string message, Exception inner)
37+
: base(message, inner)
38+
{
39+
}
40+
}
41+
}

src/PowerShellEditorServices/Services/PowerShell/Refactoring/VariableVisitor.cs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,6 @@
1010
namespace Microsoft.PowerShell.EditorServices.Refactoring
1111
{
1212

13-
public class TargetSymbolNotFoundException : Exception
14-
{
15-
public TargetSymbolNotFoundException()
16-
{
17-
}
18-
19-
public TargetSymbolNotFoundException(string message)
20-
: base(message)
21-
{
22-
}
23-
24-
public TargetSymbolNotFoundException(string message, Exception inner)
25-
: base(message, inner)
26-
{
27-
}
28-
}
29-
30-
public class TargetVariableIsDotSourcedException : Exception
31-
{
32-
public TargetVariableIsDotSourcedException()
33-
{
34-
}
35-
36-
public TargetVariableIsDotSourcedException(string message)
37-
: base(message)
38-
{
39-
}
40-
41-
public TargetVariableIsDotSourcedException(string message, Exception inner)
42-
: base(message, inner)
43-
{
44-
}
45-
}
46-
4713
internal class VariableRename : ICustomAstVisitor2
4814
{
4915
private readonly string OldName;

0 commit comments

Comments
 (0)