// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

using System;
using System.ComponentModel;

using IronPython.Runtime.Exceptions;

namespace IronPython.Runtime.Operations {
    public static partial class PythonOps {
        #region Generated Exception Factories

        // *** BEGIN GENERATED CODE ***
        // generated by function: factory_gen from: generate_exceptions.py


        public static Exception ImportError(string format, params object[] args) {
            return new ImportException(string.Format(format, args));
        }

        public static Exception RuntimeError(string format, params object[] args) {
            return new RuntimeException(string.Format(format, args));
        }

        public static Exception UnicodeTranslateError(string format, params object[] args) {
            return new UnicodeTranslateException(string.Format(format, args));
        }

        public static Exception PendingDeprecationWarning(string format, params object[] args) {
            return new PendingDeprecationWarningException(string.Format(format, args));
        }

        public static Exception LookupError(string format, params object[] args) {
            return new LookupException(string.Format(format, args));
        }

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

        public static Exception DeprecationWarning(string format, params object[] args) {
            return new DeprecationWarningException(string.Format(format, args));
        }

        public static Exception UnicodeError(string format, params object[] args) {
            return new UnicodeException(string.Format(format, args));
        }

        public static Exception FloatingPointError(string format, params object[] args) {
            return new FloatingPointException(string.Format(format, args));
        }

        public static Exception ReferenceError(string format, params object[] args) {
            return new ReferenceException(string.Format(format, args));
        }

        public static Exception FutureWarning(string format, params object[] args) {
            return new FutureWarningException(string.Format(format, args));
        }

        public static Exception AssertionError(string format, params object[] args) {
            return new AssertionException(string.Format(format, args));
        }

        public static Exception RuntimeWarning(string format, params object[] args) {
            return new RuntimeWarningException(string.Format(format, args));
        }

        public static Exception ImportWarning(string format, params object[] args) {
            return new ImportWarningException(string.Format(format, args));
        }

        public static Exception UserWarning(string format, params object[] args) {
            return new UserWarningException(string.Format(format, args));
        }

        public static Exception SyntaxWarning(string format, params object[] args) {
            return new SyntaxWarningException(string.Format(format, args));
        }

        public static Exception UnicodeWarning(string format, params object[] args) {
            return new UnicodeWarningException(string.Format(format, args));
        }

        public static Exception StopIteration(string format, params object[] args) {
            return new StopIterationException(string.Format(format, args));
        }

        public static Exception BytesWarning(string format, params object[] args) {
            return new BytesWarningException(string.Format(format, args));
        }

        public static Exception BufferError(string format, params object[] args) {
            return new BufferException(string.Format(format, args));
        }

        public static Exception ResourceWarning(string format, params object[] args) {
            return new ResourceWarningException(string.Format(format, args));
        }

        public static Exception FileExistsError(string format, params object[] args) {
            return new FileExistsException(string.Format(format, args));
        }

        public static Exception BlockingIOError(string format, params object[] args) {
            return new BlockingIOException(string.Format(format, args));
        }

        public static Exception NotADirectoryError(string format, params object[] args) {
            return new NotADirectoryException(string.Format(format, args));
        }

        public static Exception InterruptedError(string format, params object[] args) {
            return new InterruptedException(string.Format(format, args));
        }

        public static Exception ChildProcessError(string format, params object[] args) {
            return new ChildProcessException(string.Format(format, args));
        }

        public static Exception IsADirectoryError(string format, params object[] args) {
            return new IsADirectoryException(string.Format(format, args));
        }

        public static Exception ProcessLookupError(string format, params object[] args) {
            return new ProcessLookupException(string.Format(format, args));
        }

        public static Exception ConnectionError(string format, params object[] args) {
            return new ConnectionException(string.Format(format, args));
        }

        public static Exception ConnectionAbortedError(string format, params object[] args) {
            return new ConnectionAbortedException(string.Format(format, args));
        }

        public static Exception BrokenPipeError(string format, params object[] args) {
            return new BrokenPipeException(string.Format(format, args));
        }

        public static Exception ConnectionRefusedError(string format, params object[] args) {
            return new ConnectionRefusedException(string.Format(format, args));
        }

        public static Exception ConnectionResetError(string format, params object[] args) {
            return new ConnectionResetException(string.Format(format, args));
        }

        public static Exception RecursionError(string format, params object[] args) {
            return new RecursionException(string.Format(format, args));
        }

        public static Exception StopAsyncIteration(string format, params object[] args) {
            return new StopAsyncIterationException(string.Format(format, args));
        }

        public static Exception ModuleNotFoundError(string format, params object[] args) {
            return new ModuleNotFoundException(string.Format(format, args));
        }

        // *** END GENERATED CODE ***

        #endregion
    }
}
