PageRenderTime 34ms CodeModel.GetById 8ms RepoModel.GetById 0ms app.codeStats 1ms

/IronPython_Main/Languages/IronPython/IronPython/Runtime/Exceptions/AssertionException.Generated.cs

#
C# | 77 lines | 47 code | 13 blank | 17 comment | 2 complexity | 165e5b58db17ff275713d689f2b7e1af MD5 | raw file
Possible License(s): GPL-2.0, MPL-2.0-no-copyleft-exception, CPL-1.0, CC-BY-SA-3.0, BSD-3-Clause, ISC, AGPL-3.0, LGPL-2.1, Apache-2.0
  1. /* ****************************************************************************
  2. *
  3. * Copyright (c) Microsoft Corporation.
  4. *
  5. * This source code is subject to terms and conditions of the Apache License, Version 2.0. A
  6. * copy of the license can be found in the License.html file at the root of this distribution. If
  7. * you cannot locate the Apache License, Version 2.0, please send an email to
  8. * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
  9. * by the terms of the Apache License, Version 2.0.
  10. *
  11. * You must not remove this notice, or any other, from this software.
  12. *
  13. *
  14. * ***************************************************************************/
  15. using System;
  16. using System.Collections.Generic;
  17. using System.Runtime.Serialization;
  18. using Microsoft.Scripting.Runtime;
  19. namespace IronPython.Runtime.Exceptions {
  20. #region Generated AssertionException
  21. // *** BEGIN GENERATED CODE ***
  22. // generated by function: gen_one_exception_specialized from: generate_exceptions.py
  23. [Serializable]
  24. public class AssertionException : Exception, IPythonAwareException {
  25. private object _pyExceptionObject;
  26. private List<DynamicStackFrame> _frames;
  27. private TraceBack _traceback;
  28. public AssertionException() : base() { }
  29. public AssertionException(string msg) : base(msg) { }
  30. public AssertionException(string message, Exception innerException)
  31. : base(message, innerException) {
  32. }
  33. #if !SILVERLIGHT // SerializationInfo
  34. protected AssertionException(SerializationInfo info, StreamingContext context) : base(info, context) { }
  35. [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
  36. public override void GetObjectData(SerializationInfo info, StreamingContext context) {
  37. info.AddValue("frames", _frames);
  38. info.AddValue("traceback", _traceback);
  39. base.GetObjectData(info, context);
  40. }
  41. #endif
  42. object IPythonAwareException.PythonException {
  43. get {
  44. if (_pyExceptionObject == null) {
  45. var newEx = new PythonExceptions.BaseException(PythonExceptions.AssertionError);
  46. newEx.InitializeFromClr(this);
  47. _pyExceptionObject = newEx;
  48. }
  49. return _pyExceptionObject;
  50. }
  51. set { _pyExceptionObject = value; }
  52. }
  53. List<DynamicStackFrame> IPythonAwareException.Frames {
  54. get { return _frames; }
  55. set { _frames = value; }
  56. }
  57. TraceBack IPythonAwareException.TraceBack {
  58. get { return _traceback; }
  59. set { _traceback = value; }
  60. }
  61. }
  62. // *** END GENERATED CODE ***
  63. #endregion
  64. }