catchable defects (#13626)
* allow defects to be caught even for --exceptions:goto (WIP) * implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180 * new implementation for integer overflow checking * produce a warning if a user-defined exception type inherits from Exception directly * applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic' * fixes #13627 * don't inherit from Exception directly
This commit is contained in:
parent
14b2354b7d
commit
a6682de004
35 changed files with 441 additions and 142 deletions
|
|
@ -229,7 +229,7 @@ type
|
|||
TNodeKinds* = set[TNodeKind]
|
||||
|
||||
type
|
||||
TSymFlag* = enum # 41 flags!
|
||||
TSymFlag* = enum # 42 flags!
|
||||
sfUsed, # read access of sym (for warnings) or simply used
|
||||
sfExported, # symbol is exported from module
|
||||
sfFromGeneric, # symbol is instantiation of a generic; this is needed
|
||||
|
|
@ -289,6 +289,8 @@ type
|
|||
sfTemplateParam # symbol is a template parameter
|
||||
sfCursor # variable/field is a cursor, see RFC 177 for details
|
||||
sfInjectDestructors # whether the proc needs the 'injectdestructors' transformation
|
||||
sfAlwaysReturn # proc can never raise an exception, not even OverflowError
|
||||
# or out-of-memory
|
||||
|
||||
TSymFlags* = set[TSymFlag]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue