PageRenderTime 24ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/DLR_Main/Languages/IronPython/IronPython/Runtime/Operations/PythonOps.Generated.cs

https://bitbucket.org/mdavid/dlr
C# | 118 lines | 74 code | 27 blank | 17 comment | 0 complexity | 2694dfe2a6ee5672eed27e002e6d3b59 MD5 | raw file
  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 IronPython.Runtime.Exceptions;
  17. #if !SILVERLIGHT
  18. using System.ComponentModel;
  19. #endif
  20. namespace IronPython.Runtime.Operations {
  21. public static partial class PythonOps {
  22. #region Generated Exception Factories
  23. // *** BEGIN GENERATED CODE ***
  24. // generated by function: factory_gen from: generate_exceptions.py
  25. public static Exception ImportError(string format, params object[] args) {
  26. return new ImportException(string.Format(format, args));
  27. }
  28. public static Exception RuntimeError(string format, params object[] args) {
  29. return new RuntimeException(string.Format(format, args));
  30. }
  31. public static Exception UnicodeTranslateError(string format, params object[] args) {
  32. return new UnicodeTranslateException(string.Format(format, args));
  33. }
  34. public static Exception PendingDeprecationWarning(string format, params object[] args) {
  35. return new PendingDeprecationWarningException(string.Format(format, args));
  36. }
  37. public static Exception EnvironmentError(string format, params object[] args) {
  38. return new EnvironmentException(string.Format(format, args));
  39. }
  40. public static Exception LookupError(string format, params object[] args) {
  41. return new LookupException(string.Format(format, args));
  42. }
  43. public static Exception OSError(string format, params object[] args) {
  44. return new OSException(string.Format(format, args));
  45. }
  46. public static Exception DeprecationWarning(string format, params object[] args) {
  47. return new DeprecationWarningException(string.Format(format, args));
  48. }
  49. public static Exception UnicodeError(string format, params object[] args) {
  50. return new UnicodeException(string.Format(format, args));
  51. }
  52. public static Exception FloatingPointError(string format, params object[] args) {
  53. return new FloatingPointException(string.Format(format, args));
  54. }
  55. public static Exception ReferenceError(string format, params object[] args) {
  56. return new ReferenceException(string.Format(format, args));
  57. }
  58. public static Exception FutureWarning(string format, params object[] args) {
  59. return new FutureWarningException(string.Format(format, args));
  60. }
  61. public static Exception AssertionError(string format, params object[] args) {
  62. return new AssertionException(string.Format(format, args));
  63. }
  64. public static Exception RuntimeWarning(string format, params object[] args) {
  65. return new RuntimeWarningException(string.Format(format, args));
  66. }
  67. public static Exception ImportWarning(string format, params object[] args) {
  68. return new ImportWarningException(string.Format(format, args));
  69. }
  70. public static Exception UserWarning(string format, params object[] args) {
  71. return new UserWarningException(string.Format(format, args));
  72. }
  73. public static Exception SyntaxWarning(string format, params object[] args) {
  74. return new SyntaxWarningException(string.Format(format, args));
  75. }
  76. public static Exception UnicodeWarning(string format, params object[] args) {
  77. return new UnicodeWarningException(string.Format(format, args));
  78. }
  79. public static Exception StopIteration(string format, params object[] args) {
  80. return new StopIterationException(string.Format(format, args));
  81. }
  82. public static Exception BytesWarning(string format, params object[] args) {
  83. return new BytesWarningException(string.Format(format, args));
  84. }
  85. public static Exception BufferError(string format, params object[] args) {
  86. return new BufferException(string.Format(format, args));
  87. }
  88. // *** END GENERATED CODE ***
  89. #endregion
  90. }
  91. }