4 Commits

Author SHA1 Message Date
ringabout
26b86c8f4d Makes except: panics on Defect (#24821)
implements https://github.com/nim-lang/RFCs/issues/557


It inserts defect handing into a bare except branch

```nim
try:
  raiseAssert "test"
except:
  echo "nope"
```

=>

```nim
try:
  raiseAssert "test"
except:
  # New behaviov, now well-defined: **never** catches the assert, regardless of panic mode
  raiseDefect()
  echo "nope"
```

In this way, `except` still catches foreign exceptions, but panics on
`Defect`. Probably when Nim has `except {.foreign.}`, we can extend
`raiseDefect` to foreign exceptions as well. That's supposed to be a
small use case anyway.

 `--legacy:noPanicOnExcept` is provided for a transition period.
2025-04-03 16:09:58 +02:00
Leorize
73c8391fd3 azure: disable failing tests 2019-10-03 18:36:18 +02:00
cooldome
0ef93bdea4 update test 2018-04-29 23:26:21 +01:00
cooldome
0c9c1c013e Add a test 2018-04-29 22:57:05 +01:00