Skip to content

Commit d5a3ac3

Browse files
committed
Fix generate
1 parent 4d6bd05 commit d5a3ac3

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

eng/scripts/generate_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def get_clr_name(e):
265265
return e.replace('Error', '') + 'Exception'
266266

267267
FACTORY = """
268-
public static Exception %(name)s(string format, params object[] args) {
268+
public static Exception %(name)s(string format, params object?[] args) {
269269
return new %(clrname)s(string.Format(format, args));
270270
}"""
271271

src/core/IronPython/Runtime/Operations/PythonOps.Generated.cs

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,147 +17,147 @@ public static partial class PythonOps {
1717
// generated by function: factory_gen from: generate_exceptions.py
1818

1919

20-
public static Exception ImportError(string format, params object[] args) {
20+
public static Exception ImportError(string format, params object?[] args) {
2121
return new ImportException(string.Format(format, args));
2222
}
2323

24-
public static Exception RuntimeError(string format, params object[] args) {
24+
public static Exception RuntimeError(string format, params object?[] args) {
2525
return new RuntimeException(string.Format(format, args));
2626
}
2727

28-
public static Exception UnicodeTranslateError(string format, params object[] args) {
28+
public static Exception UnicodeTranslateError(string format, params object?[] args) {
2929
return new UnicodeTranslateException(string.Format(format, args));
3030
}
3131

32-
public static Exception PendingDeprecationWarning(string format, params object[] args) {
32+
public static Exception PendingDeprecationWarning(string format, params object?[] args) {
3333
return new PendingDeprecationWarningException(string.Format(format, args));
3434
}
3535

36-
public static Exception LookupError(string format, params object[] args) {
36+
public static Exception LookupError(string format, params object?[] args) {
3737
return new LookupException(string.Format(format, args));
3838
}
3939

4040
public static Exception OSError(string format, params object?[] args) {
4141
return new OSException(string.Format(format, args));
4242
}
4343

44-
public static Exception DeprecationWarning(string format, params object[] args) {
44+
public static Exception DeprecationWarning(string format, params object?[] args) {
4545
return new DeprecationWarningException(string.Format(format, args));
4646
}
4747

48-
public static Exception UnicodeError(string format, params object[] args) {
48+
public static Exception UnicodeError(string format, params object?[] args) {
4949
return new UnicodeException(string.Format(format, args));
5050
}
5151

52-
public static Exception FloatingPointError(string format, params object[] args) {
52+
public static Exception FloatingPointError(string format, params object?[] args) {
5353
return new FloatingPointException(string.Format(format, args));
5454
}
5555

56-
public static Exception ReferenceError(string format, params object[] args) {
56+
public static Exception ReferenceError(string format, params object?[] args) {
5757
return new ReferenceException(string.Format(format, args));
5858
}
5959

60-
public static Exception FutureWarning(string format, params object[] args) {
60+
public static Exception FutureWarning(string format, params object?[] args) {
6161
return new FutureWarningException(string.Format(format, args));
6262
}
6363

64-
public static Exception AssertionError(string format, params object[] args) {
64+
public static Exception AssertionError(string format, params object?[] args) {
6565
return new AssertionException(string.Format(format, args));
6666
}
6767

68-
public static Exception RuntimeWarning(string format, params object[] args) {
68+
public static Exception RuntimeWarning(string format, params object?[] args) {
6969
return new RuntimeWarningException(string.Format(format, args));
7070
}
7171

72-
public static Exception ImportWarning(string format, params object[] args) {
72+
public static Exception ImportWarning(string format, params object?[] args) {
7373
return new ImportWarningException(string.Format(format, args));
7474
}
7575

76-
public static Exception UserWarning(string format, params object[] args) {
76+
public static Exception UserWarning(string format, params object?[] args) {
7777
return new UserWarningException(string.Format(format, args));
7878
}
7979

80-
public static Exception SyntaxWarning(string format, params object[] args) {
80+
public static Exception SyntaxWarning(string format, params object?[] args) {
8181
return new SyntaxWarningException(string.Format(format, args));
8282
}
8383

84-
public static Exception UnicodeWarning(string format, params object[] args) {
84+
public static Exception UnicodeWarning(string format, params object?[] args) {
8585
return new UnicodeWarningException(string.Format(format, args));
8686
}
8787

88-
public static Exception StopIteration(string format, params object[] args) {
88+
public static Exception StopIteration(string format, params object?[] args) {
8989
return new StopIterationException(string.Format(format, args));
9090
}
9191

92-
public static Exception BytesWarning(string format, params object[] args) {
92+
public static Exception BytesWarning(string format, params object?[] args) {
9393
return new BytesWarningException(string.Format(format, args));
9494
}
9595

96-
public static Exception BufferError(string format, params object[] args) {
96+
public static Exception BufferError(string format, params object?[] args) {
9797
return new BufferException(string.Format(format, args));
9898
}
9999

100-
public static Exception ResourceWarning(string format, params object[] args) {
100+
public static Exception ResourceWarning(string format, params object?[] args) {
101101
return new ResourceWarningException(string.Format(format, args));
102102
}
103103

104-
public static Exception FileExistsError(string format, params object[] args) {
104+
public static Exception FileExistsError(string format, params object?[] args) {
105105
return new FileExistsException(string.Format(format, args));
106106
}
107107

108-
public static Exception BlockingIOError(string format, params object[] args) {
108+
public static Exception BlockingIOError(string format, params object?[] args) {
109109
return new BlockingIOException(string.Format(format, args));
110110
}
111111

112-
public static Exception NotADirectoryError(string format, params object[] args) {
112+
public static Exception NotADirectoryError(string format, params object?[] args) {
113113
return new NotADirectoryException(string.Format(format, args));
114114
}
115115

116-
public static Exception InterruptedError(string format, params object[] args) {
116+
public static Exception InterruptedError(string format, params object?[] args) {
117117
return new InterruptedException(string.Format(format, args));
118118
}
119119

120-
public static Exception ChildProcessError(string format, params object[] args) {
120+
public static Exception ChildProcessError(string format, params object?[] args) {
121121
return new ChildProcessException(string.Format(format, args));
122122
}
123123

124-
public static Exception IsADirectoryError(string format, params object[] args) {
124+
public static Exception IsADirectoryError(string format, params object?[] args) {
125125
return new IsADirectoryException(string.Format(format, args));
126126
}
127127

128-
public static Exception ProcessLookupError(string format, params object[] args) {
128+
public static Exception ProcessLookupError(string format, params object?[] args) {
129129
return new ProcessLookupException(string.Format(format, args));
130130
}
131131

132-
public static Exception ConnectionError(string format, params object[] args) {
132+
public static Exception ConnectionError(string format, params object?[] args) {
133133
return new ConnectionException(string.Format(format, args));
134134
}
135135

136-
public static Exception ConnectionAbortedError(string format, params object[] args) {
136+
public static Exception ConnectionAbortedError(string format, params object?[] args) {
137137
return new ConnectionAbortedException(string.Format(format, args));
138138
}
139139

140-
public static Exception BrokenPipeError(string format, params object[] args) {
140+
public static Exception BrokenPipeError(string format, params object?[] args) {
141141
return new BrokenPipeException(string.Format(format, args));
142142
}
143143

144-
public static Exception ConnectionRefusedError(string format, params object[] args) {
144+
public static Exception ConnectionRefusedError(string format, params object?[] args) {
145145
return new ConnectionRefusedException(string.Format(format, args));
146146
}
147147

148-
public static Exception ConnectionResetError(string format, params object[] args) {
148+
public static Exception ConnectionResetError(string format, params object?[] args) {
149149
return new ConnectionResetException(string.Format(format, args));
150150
}
151151

152-
public static Exception RecursionError(string format, params object[] args) {
152+
public static Exception RecursionError(string format, params object?[] args) {
153153
return new RecursionException(string.Format(format, args));
154154
}
155155

156-
public static Exception StopAsyncIteration(string format, params object[] args) {
156+
public static Exception StopAsyncIteration(string format, params object?[] args) {
157157
return new StopAsyncIterationException(string.Format(format, args));
158158
}
159159

160-
public static Exception ModuleNotFoundError(string format, params object[] args) {
160+
public static Exception ModuleNotFoundError(string format, params object?[] args) {
161161
return new ModuleNotFoundException(string.Format(format, args));
162162
}
163163

0 commit comments

Comments
 (0)