public ExceptionMapping(string python, Type clr, ExceptionMapping[] subtypes)
 {
     pythonException = python;
     pythonModule = ExceptionConverter.defaultExceptionModule;
     clrException = clr;
     this.subtypes = subtypes;
     creator = ExceptionConverter.DefaultExceptionCreator;
 }
        public static void CreateExceptionMapping(IPythonType baseType, ExceptionMapping em)
        {
            IPythonType type = CreatePythonException(em.PythonException, em.PythonModule, baseType, em.Creator);

            pythonToClr[type] = em.ClrException;
            clrToPython[em.ClrException] = type;

            if (em.Subtypes != null) {
                for (int i = 0; i < em.Subtypes.Count; i++) {
                    CreateExceptionMapping(type, em.Subtypes[i]);
                }
            }
        }