From: Finn B. <bc...@us...> - 2001-03-04 18:07:57
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv26757 Modified Files: exceptions.java Log Message: Fixed formatting (long lines, trailing spaces). Index: exceptions.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/exceptions.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** exceptions.java 2001/02/25 16:52:54 1.6 --- exceptions.java 2001/03/04 18:09:29 1.7 *************** *** 13,21 **** public class exceptions implements ClassDictInit { ! public static String __doc__ = "Python's standard exception class hierarchy.\n" + "\n" + "Here is a rundown of the class hierarchy. The classes found here are\n" + ! "inserted into both the exceptions module and the `built-in' module. It is\n" + "recommended that user defined class based exceptions be derived from the\n" + "`Exception' class, although this is currently not enforced.\n" + --- 13,22 ---- public class exceptions implements ClassDictInit { ! public static String __doc__ = "Python's standard exception class hierarchy.\n" + "\n" + "Here is a rundown of the class hierarchy. The classes found here are\n" + ! "inserted into both the exceptions module and the `built-in' module. "+ ! "It is\n" + "recommended that user defined class based exceptions be derived from the\n" + "`Exception' class, although this is currently not enforced.\n" + *************** *** 80,83 **** --- 81,85 ---- private exceptions() { ; } + /** <i>Internal use only. Do not call this method explicit.</i> */ public static void classDictInit(PyObject dict) { dict.invoke("clear"); *************** *** 117,121 **** "Improper mixture of spaces and tabs."); ! buildClass(dict, "EnvironmentError", "StandardError", "EnvironmentError", "Base class for I/O related errors."); --- 119,124 ---- "Improper mixture of spaces and tabs."); ! buildClass(dict, "EnvironmentError", "StandardError", ! "EnvironmentError", "Base class for I/O related errors."); *************** *** 129,133 **** "Unspecified run-time error."); ! buildClass(dict, "NotImplementedError", "RuntimeError", "empty__init__", "Method or function hasn't been implemented yet."); --- 132,137 ---- "Unspecified run-time error."); ! buildClass(dict, "NotImplementedError", "RuntimeError", ! "empty__init__", "Method or function hasn't been implemented yet."); *************** *** 154,158 **** "Unicode related error."); ! buildClass(dict, "KeyboardInterrupt", "StandardError", "empty__init__", "Program interrupted by user."); --- 158,163 ---- "Unicode related error."); ! buildClass(dict, "KeyboardInterrupt", "StandardError", ! "empty__init__", "Program interrupted by user."); *************** *** 166,174 **** "Result too large to be represented."); ! buildClass(dict, "FloatingPointError", "ArithmeticError", "empty__init__", "Floating point operation failed."); ! buildClass(dict, "ZeroDivisionError", "ArithmeticError", "empty__init__", ! "Second argument to a division or modulo operation was zero."); buildClass(dict, "LookupError", "StandardError", "empty__init__", --- 171,182 ---- "Result too large to be represented."); ! buildClass(dict, "FloatingPointError", "ArithmeticError", ! "empty__init__", "Floating point operation failed."); ! buildClass(dict, "ZeroDivisionError", "ArithmeticError", ! "empty__init__", ! "Second argument to a division or modulo operation "+ ! "was zero."); buildClass(dict, "LookupError", "StandardError", "empty__init__", *************** *** 213,217 **** - // An empty __init__ method public static PyObject empty__init__(PyObject[] arg, String[] kws) { --- 221,224 ---- *************** *** 221,225 **** } - public static PyObject Exception(PyObject[] arg, String[] kws) { --- 228,231 ---- *************** *** 252,256 **** } ! public static PyObject Exception__getitem__(PyObject[] arg, String[] kws) { ArgParser ap = new ArgParser("__getitem__", arg, kws, "self", "i"); PyObject self = ap.getPyObject(0); --- 258,264 ---- } ! public static PyObject Exception__getitem__(PyObject[] arg, ! String[] kws) ! { ArgParser ap = new ArgParser("__getitem__", arg, kws, "self", "i"); PyObject self = ap.getPyObject(0); *************** *** 306,310 **** } ! public static void EnvironmentError__init__(PyObject[] arg, String[] kws) { ArgParser ap = new ArgParser("__init__", arg, kws, "self", "args"); PyObject self = ap.getPyObject(0); --- 314,320 ---- } ! public static void EnvironmentError__init__(PyObject[] arg, ! String[] kws) ! { ArgParser ap = new ArgParser("__init__", arg, kws, "self", "args"); PyObject self = ap.getPyObject(0); *************** *** 328,332 **** self.__setattr__("strerror", tmp[1]); self.__setattr__("filename", tmp[2]); ! self.__setattr__("args", args.__getslice__(Py.Zero, Py.newInteger(2), Py.One)); } if (args.__len__() == 2) { --- 338,343 ---- self.__setattr__("strerror", tmp[1]); self.__setattr__("filename", tmp[2]); ! self.__setattr__("args", ! args.__getslice__(Py.Zero, Py.newInteger(2), Py.One)); } if (args.__len__() == 2) { *************** *** 338,342 **** } ! public static PyString EnvironmentError__str__(PyObject[] arg, String[] kws) { ArgParser ap = new ArgParser("__init__", arg, kws, "self"); PyObject self = ap.getPyObject(0); --- 349,355 ---- } ! public static PyString EnvironmentError__str__(PyObject[] arg, ! String[] kws) ! { ArgParser ap = new ArgParser("__init__", arg, kws, "self"); PyObject self = ap.getPyObject(0); *************** *** 344,348 **** if (self.__getattr__("filename") != Py.None) { return Py.newString("[Errno %s] %s: %s").__mod__( ! new PyTuple(new PyObject[] { self.__getattr__("errno"), self.__getattr__("strerror"), --- 357,361 ---- if (self.__getattr__("filename") != Py.None) { return Py.newString("[Errno %s] %s: %s").__mod__( ! new PyTuple(new PyObject[] { self.__getattr__("errno"), self.__getattr__("strerror"), *************** *** 387,395 **** private static PyObject buildClass(PyObject dict, String classname, ! String superclass, String classCodeName, String doc) { PyObject[] sclass = Py.EmptyObjects; if (superclass != null) ! sclass = new PyObject[] { dict.__getitem__(new PyString(superclass)) }; PyObject cls = Py.makeClass( classname, sclass, --- 400,410 ---- private static PyObject buildClass(PyObject dict, String classname, ! String superclass, ! String classCodeName, String doc) { PyObject[] sclass = Py.EmptyObjects; if (superclass != null) ! sclass = new PyObject[] { ! dict.__getitem__(new PyString(superclass)) }; PyObject cls = Py.makeClass( classname, sclass, |