Re: yet another segfault - array out of bound is not caught by try catch

2021-09-18 Thread russhy via Digitalmars-d-learn
Double check in your dub.json file and see if you haven't changed your buildoptions DEBUG: it's caught: https://run.dlang.io/is/F8HkD8 RELEASE: segfault as expected: https://run.dlang.io/is/oLU2M3 And make sure to use latest version of ldc

Re: yet another segfault - array out of bound is not caught by try catch

2021-09-17 Thread jfondren via Digitalmars-d-learn
On Friday, 17 September 2021 at 11:10:33 UTC, seany wrote: Compile with `dub build --compiler=ldc2 `. this should enable array bound checking options. By default, yes. run `dub -v build --compiler=ldc2` to see the exact commands that dub runs. But should it not be caught by range error

Re: yet another segfault - array out of bound is not caught by try catch

2021-09-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Friday, 17 September 2021 at 11:10:33 UTC, seany wrote: I have now this function, as a private member in a Class : } catch (RangeError er) { I can't remember if you can catch an index OOB error but try `catch (Throwable er)` will work if it is catchable at all and you can