Objects/exceptions/base

Search:
Group by:
Source   Edit  

PyBaseErrorObject is old alias in NPython, and this makes it consist as so that all exceptions are in form of XxxError

Types

PyAttributeErrorObject = ref object of PyExceptionObject
  name*: PyObject
  obj*: PyObject
Source   Edit  
PyBaseExceptionObject = ref object of PyObject
  base_tk*: BaseExceptionToken
  thrown*: bool
  args*: PyTupleObject
  context*: PyBaseExceptionObject
  traceBacks*: seq[TraceBack]
Source   Edit  
PyEOFErrorObject = ref object of PyExceptionObject
Source   Edit  
PyImportErrorObject = ref object of PyExceptionObject
  msg*: PyObject
  name*: PyObject
  name_from*: PyObject
  path*: PyObject
Source   Edit  
PyNameErrorObject = ref object of PyExceptionObject
  name*: PyObject
Source   Edit  
PyOSErrorObject = ref object of PyExceptionObject
  myerrno*: PyObject
  strerror*: PyObject
  filename*: PyObject
  filename2*: PyObject
  winerror*: PyObject
  written*: PyObject
Source   Edit  
PyStopIterErrorObject = ref object of PyExceptionObject
  value*: PyObject
Source   Edit  
PySyntaxErrorObject = ref object of PyExceptionObject
  end_lineno*: PyObject
  end_offset*: PyObject
  filename*: PyObject
  lineno*: PyObject
  msg*: PyObject
  offset*: PyObject
  print_file_and_line*: PyObject
  text*: PyObject
Source   Edit  
PySystemExitObject = ref object of PyExceptionObject
  code*: PyObject
Source   Edit  
TraceBack = tuple[fileName: PyObject, funName: PyObject, lineNo: int, colNo: int]
Source   Edit  

Lets

pyArithmeticErrorObjectType {.inject.} = newPyType("ArithmeticError",
    pyExceptionObjectType)
Source   Edit  
pyAssertionErrorObjectType {.inject.} = newPyType("AssertionError",
    pyExceptionObjectType)
Source   Edit  
pyAttributeErrorObjectType {.inject.} = newPyType("AttributeError",
    pyExceptionObjectType)
Source   Edit  
pyBaseExceptionObjectType {.inject.} = newPyType("baseexception", pyObjectType)
Source   Edit  
pyBufferErrorObjectType {.inject.} = newPyType("BufferError",
    pyExceptionObjectType)
Source   Edit  
pyEOFErrorObjectType {.inject.} = newPyType("EOFError", pyExceptionObjectType)
Source   Edit  
pyExceptionObjectType {.inject.} = newPyType("exception",
    pyBaseExceptionObjectType)
Source   Edit  
pyGeneratorExitObjectType {.inject.} = newPyType("GeneratorExit",
    pyExceptionObjectType)
Source   Edit  
pyImportErrorObjectType {.inject.} = newPyType("ImportError",
    pyExceptionObjectType)
Source   Edit  
pyKeyboardInterruptObjectType {.inject.} = newPyType("KeyboardInterrupt",
    pyExceptionObjectType)
Source   Edit  
pyLockErrorObjectType {.inject.} = newPyType("LockError", pyExceptionObjectType)
Source   Edit  
pyLookupErrorObjectType {.inject.} = newPyType("LookupError",
    pyExceptionObjectType)
Source   Edit  
pyMemoryErrorObjectType {.inject.} = newPyType("MemoryError",
    pyExceptionObjectType)
Source   Edit  
pyNameErrorObjectType {.inject.} = newPyType("NameError", pyExceptionObjectType)
Source   Edit  
pyOSErrorObjectType {.inject.} = newPyType("OSError", pyExceptionObjectType)
Source   Edit  
pyRuntimeErrorObjectType {.inject.} = newPyType("RuntimeError",
    pyExceptionObjectType)
Source   Edit  
pyStopIterErrorObjectType {.inject.} = newPyType("StopIteration",
    pyExceptionObjectType)
Source   Edit  
pySyntaxErrorObjectType {.inject.} = newPyType("SyntaxError",
    pyExceptionObjectType)
Source   Edit  
pySystemErrorObjectType {.inject.} = newPyType("SystemError",
    pyExceptionObjectType)
Source   Edit  
pySystemExitObjectType {.inject.} = newPyType("SystemExit",
    pyExceptionObjectType)
Source   Edit  
pyTypeErrorObjectType {.inject.} = newPyType("TypeError", pyExceptionObjectType)
Source   Edit  
pyValueErrorObjectType {.inject.} = newPyType("ValueError",
    pyExceptionObjectType)
Source   Edit  

Procs

proc getBltinName(excp: BaseExceptionToken): string {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc getBltinName(excp: ExceptionToken): string {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc getTokenName(excp: ExceptionToken | BaseExceptionToken): string
Source   Edit  
proc isExceptionOf(obj: PyObject; tk: ExceptionToken): bool {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc isStopIter(obj: PyObject): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc newArithmeticError(): PyArithmeticErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newArithmeticError(msgStr: PyStrObject): PyArithmeticErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newAssertionError(): PyAssertionErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newAssertionError(msgStr: PyStrObject): PyAssertionErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newAttributeError(): PyAttributeErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newAttributeError(msgStr: PyStrObject): PyAttributeErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newBaseError(): PyBaseErrorObject {.inline, ...raises: [], tags: [RootEffect],
    forbids: [].}
Source   Edit  
proc newBaseError(msgStr: PyStrObject): PyBaseErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newBaseException(): PyBaseExceptionObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newBaseException(msgStr: PyStrObject): PyBaseExceptionObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newBufferError(): PyBufferErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newBufferError(msgStr: PyStrObject): PyBufferErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newEOFError(): PyEOFErrorObject {.inline, ...raises: [], tags: [RootEffect],
                                       forbids: [].}
Source   Edit  
proc newEOFError(msgStr: PyStrObject): PyEOFErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newGeneratorExit(): PyGeneratorExitObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newGeneratorExit(msgStr: PyStrObject): PyGeneratorExitObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newImportError(): PyImportErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newImportError(msgStr: PyStrObject): PyImportErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newKeyboardInterrupt(): PyKeyboardInterruptObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newKeyboardInterrupt(msgStr: PyStrObject): PyKeyboardInterruptObject {.
    inline, ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newLockError(): PyLockErrorObject {.inline, ...raises: [], tags: [RootEffect],
    forbids: [].}
Source   Edit  
proc newLockError(msgStr: PyStrObject): PyLockErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newLookupError(): PyLookupErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newLookupError(msgStr: PyStrObject): PyLookupErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newMemoryError(): PyMemoryErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newMemoryError(msgStr: PyStrObject): PyMemoryErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newNameError(): PyNameErrorObject {.inline, ...raises: [], tags: [RootEffect],
    forbids: [].}
Source   Edit  
proc newNameError(msgStr: PyStrObject): PyNameErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newOSError(): PyOSErrorObject {.inline, ...raises: [], tags: [RootEffect],
                                     forbids: [].}
Source   Edit  
proc newOSError(msgStr: PyStrObject): PyOSErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyArithmeticErrorSimple(): PyArithmeticErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyAssertionErrorSimple(): PyAssertionErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyAttributeErrorSimple(): PyAttributeErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyBaseExceptionSimple(): PyBaseExceptionObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyBufferErrorSimple(): PyBufferErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyEOFErrorSimple(): PyEOFErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyExceptionSimple(): PyExceptionObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyGeneratorExitSimple(): PyGeneratorExitObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyImportErrorSimple(): PyImportErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyKeyboardInterruptSimple(): PyKeyboardInterruptObject {.cdecl,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyLockErrorSimple(): PyLockErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyLookupErrorSimple(): PyLookupErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyMemoryErrorSimple(): PyMemoryErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyNameErrorSimple(): PyNameErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyOSErrorSimple(): PyOSErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyRuntimeErrorSimple(): PyRuntimeErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyStopIterErrorSimple(): PyStopIterErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPySyntaxErrorSimple(): PySyntaxErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPySystemErrorSimple(): PySystemErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPySystemExitSimple(): PySystemExitObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyTypeErrorSimple(): PyTypeErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newPyValueErrorSimple(): PyValueErrorObject {.cdecl, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newRuntimeError(): PyRuntimeErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newRuntimeError(msgStr: PyStrObject): PyRuntimeErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newStopIterError(): PyStopIterErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newStopIterError(msgStr: PyStrObject): PyStopIterErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newSyntaxError(): PySyntaxErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newSyntaxError(msgStr: PyStrObject): PySyntaxErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newSystemError(): PySystemErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newSystemError(msgStr: PyStrObject): PySystemErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newSystemExit(): PySystemExitObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newSystemExit(msgStr: PyStrObject): PySystemExitObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc newTypeError(): PyTypeErrorObject {.inline, ...raises: [], tags: [RootEffect],
    forbids: [].}
Source   Edit  
proc newTypeError(msgStr: PyStrObject): PyTypeErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newValueError(): PyValueErrorObject {.inline, ...raises: [],
    tags: [RootEffect], forbids: [].}
Source   Edit  
proc newValueError(msgStr: PyStrObject): PyValueErrorObject {.inline,
    ...raises: [], tags: [RootEffect], forbids: [].}
Source   Edit  
proc ofExactPyArithmeticErrorObject(obj`gensym54: PyObject): bool {.cdecl,
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyAssertionErrorObject(obj`gensym109: PyObject): bool {.cdecl,
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyAttributeErrorObject(obj`gensym60: PyObject): bool {.cdecl,
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyBaseExceptionObject(obj`gensym2: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyBufferErrorObject(obj`gensym68: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyEOFErrorObject(obj`gensym159: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyExceptionObject(obj`gensym15: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyGeneratorExitObject(obj`gensym175: PyObject): bool {.cdecl,
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyImportErrorObject(obj`gensym99: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyKeyboardInterruptObject(obj`gensym181: PyObject): bool {.cdecl,
    inline, ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyLockErrorObject(obj`gensym93: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyLookupErrorObject(obj`gensym80: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyMemoryErrorObject(obj`gensym135: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyNameErrorObject(obj`gensym40: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyOSErrorObject(obj`gensym147: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyRuntimeErrorObject(obj`gensym115: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyStopIterErrorObject(obj`gensym86: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPySyntaxErrorObject(obj`gensym121: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPySystemErrorObject(obj`gensym141: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPySystemExitObject(obj`gensym168: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyTypeErrorObject(obj`gensym48: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofExactPyValueErrorObject(obj`gensym74: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyArithmeticErrorObject(obj`gensym54: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyAssertionErrorObject(obj`gensym109: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyAttributeErrorObject(obj`gensym60: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyBaseExceptionObject(obj`gensym2: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyBufferErrorObject(obj`gensym68: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyEOFErrorObject(obj`gensym159: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyExceptionObject(obj`gensym15: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyGeneratorExitObject(obj`gensym175: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyImportErrorObject(obj`gensym99: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyKeyboardInterruptObject(obj`gensym181: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyLockErrorObject(obj`gensym93: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyLookupErrorObject(obj`gensym80: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyMemoryErrorObject(obj`gensym135: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyNameErrorObject(obj`gensym40: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyOSErrorObject(obj`gensym147: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyRuntimeErrorObject(obj`gensym115: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyStopIterErrorObject(obj`gensym86: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPySyntaxErrorObject(obj`gensym121: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPySystemErrorObject(obj`gensym141: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPySystemExitObject(obj`gensym168: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyTypeErrorObject(obj`gensym48: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc ofPyValueErrorObject(obj`gensym74: PyObject): bool {.cdecl, inline,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  

Methods

method `$`(e: PyExceptionObject): string {....raises: [], tags: [RootEffect],
    forbids: [].}
Source   Edit  

Templates

template newPyBaseErrorSimple(): untyped
Source   Edit  
template newPyStopIterationSimple(): untyped
Source   Edit