Merge branch 'araq-misc' of github.com:nim-lang/Nim into araq-misc
This commit is contained in:
commit
60c7a0a08f
3 changed files with 7 additions and 6 deletions
|
|
@ -178,7 +178,7 @@
|
||||||
of managing memory.
|
of managing memory.
|
||||||
|
|
||||||
- The exception hierarchy was slightly reworked, ``SystemError`` was renamed to
|
- The exception hierarchy was slightly reworked, ``SystemError`` was renamed to
|
||||||
``Error`` and is the new base class for any exception that is guaranteed to
|
``CatchableError`` and is the new base class for any exception that is guaranteed to
|
||||||
be catchable. This change should have minimal impact on most existing Nim code.
|
be catchable. This change should have minimal impact on most existing Nim code.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3974,7 +3974,8 @@ Every exception inherits from ``system.Exception``. Exceptions that indicate
|
||||||
programming bugs inherit from ``system.Defect`` (which is a subtype of ``Exception``)
|
programming bugs inherit from ``system.Defect`` (which is a subtype of ``Exception``)
|
||||||
and are stricly speaking not catchable as they can also be mapped to an operation
|
and are stricly speaking not catchable as they can also be mapped to an operation
|
||||||
that terminates the whole process. Exceptions that indicate any other runtime error
|
that terminates the whole process. Exceptions that indicate any other runtime error
|
||||||
that can be caught inherit from ``system.Error`` (which is a subtype of ``Exception``).
|
that can be caught inherit from ``system.CatchableError``
|
||||||
|
(which is a subtype of ``Exception``).
|
||||||
|
|
||||||
|
|
||||||
Imported exceptions
|
Imported exceptions
|
||||||
|
|
|
||||||
|
|
@ -489,18 +489,18 @@ type
|
||||||
## but that are strictly uncatchable as they can also be mapped to
|
## but that are strictly uncatchable as they can also be mapped to
|
||||||
## a ``quit`` / ``trap`` / ``exit`` operation.
|
## a ``quit`` / ``trap`` / ``exit`` operation.
|
||||||
|
|
||||||
Error* = object of Exception ## \
|
CatchableError* = object of Exception ## \
|
||||||
## Abstract class for all exceptions that are catchable.
|
## Abstract class for all exceptions that are catchable.
|
||||||
IOError* = object of Error ## \
|
IOError* = object of CatchableError ## \
|
||||||
## Raised if an IO error occurred.
|
## Raised if an IO error occurred.
|
||||||
EOFError* = object of IOError ## \
|
EOFError* = object of IOError ## \
|
||||||
## Raised if an IO "end of file" error occurred.
|
## Raised if an IO "end of file" error occurred.
|
||||||
OSError* = object of Error ## \
|
OSError* = object of CatchableError ## \
|
||||||
## Raised if an operating system service failed.
|
## Raised if an operating system service failed.
|
||||||
errorCode*: int32 ## OS-defined error code describing this error.
|
errorCode*: int32 ## OS-defined error code describing this error.
|
||||||
LibraryError* = object of OSError ## \
|
LibraryError* = object of OSError ## \
|
||||||
## Raised if a dynamic library could not be loaded.
|
## Raised if a dynamic library could not be loaded.
|
||||||
ResourceExhaustedError* = object of Error ## \
|
ResourceExhaustedError* = object of CatchableError ## \
|
||||||
## Raised if a resource request could not be fulfilled.
|
## Raised if a resource request could not be fulfilled.
|
||||||
ArithmeticError* = object of Defect ## \
|
ArithmeticError* = object of Defect ## \
|
||||||
## Raised if any kind of arithmetic error occurred.
|
## Raised if any kind of arithmetic error occurred.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue