22// The .NET Foundation licenses this file to you under the Apache 2.0 License.
33// See the LICENSE file in the project root for more information.
44
5+ #nullable enable
6+
57using System ;
68using System . Collections . Generic ;
79using System . ComponentModel ;
@@ -14,12 +16,11 @@ namespace IronPython.Runtime.Exceptions {
1416 // *** BEGIN GENERATED CODE ***
1517 // generated by function: gen_one_exception_specialized from: generate_exceptions.py
1618
17-
1819 [ Serializable ]
1920 public class BytesWarningException : WarningException , IPythonAwareException {
20- private object _pyExceptionObject ;
21- private List < DynamicStackFrame > _frames ;
22- private TraceBack _traceback ;
21+ private PythonExceptions . BaseException ? _pyExceptionObject ;
22+ private List < DynamicStackFrame > ? _frames ;
23+ private TraceBack ? _traceback ;
2324
2425 public BytesWarningException ( ) : base ( ) { }
2526 public BytesWarningException ( string msg ) : base ( msg ) { }
@@ -29,40 +30,37 @@ public BytesWarningException(string message, Exception innerException)
2930#if FEATURE_SERIALIZATION
3031 protected BytesWarningException ( SerializationInfo info , StreamingContext context ) : base ( info , context ) { }
3132
32- [ System . Diagnostics . CodeAnalysis . SuppressMessage ( "Microsoft.Security" , "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase" ) ]
3333 public override void GetObjectData ( SerializationInfo info , StreamingContext context ) {
3434 info . AddValue ( "frames" , _frames ) ;
3535 info . AddValue ( "traceback" , _traceback ) ;
3636 base . GetObjectData ( info , context ) ;
3737 }
3838#endif
3939
40- object IPythonAwareException . PythonException {
41- get {
40+ PythonExceptions . BaseException ? IPythonAwareException . PythonException {
41+ get {
4242 if ( _pyExceptionObject == null ) {
4343 var newEx = new PythonExceptions . BaseException ( PythonExceptions . BytesWarning ) ;
4444 newEx . InitializeFromClr ( this ) ;
4545 _pyExceptionObject = newEx ;
4646 }
47- return _pyExceptionObject ;
47+ return _pyExceptionObject ;
4848 }
4949 set { _pyExceptionObject = value ; }
5050 }
5151
52- List < DynamicStackFrame > IPythonAwareException . Frames {
52+ List < DynamicStackFrame > ? IPythonAwareException . Frames {
5353 get { return _frames ; }
5454 set { _frames = value ; }
5555 }
5656
57- TraceBack IPythonAwareException . TraceBack {
57+ TraceBack ? IPythonAwareException . TraceBack {
5858 get { return _traceback ; }
5959 set { _traceback = value ; }
6060 }
6161 }
6262
63-
6463 // *** END GENERATED CODE ***
6564
6665 #endregion
67-
6866}
0 commit comments