summary refs log tree commit diff stats
path: root/tests/exception
Commit message (Collapse)AuthorAgeFilesLines
* nimRawSetjmp: support Windows (#19197)Ștefan Talpalaru2021-12-102-2/+134
| | | | | | | | | | | | * nimRawSetjmp: support Windows Using `_setjmp()` directly is required to avoid some rare (but very annoying) exception-related stack corruption leading to segfaults on Windows, with Mingw-w64 and SEH. More details: https://github.com/status-im/nimbus-eth2/issues/3121 Also add "nimBuiltinSetjmp" - mostly for benchmarking. * fix for Apple's Clang++
* fix #18620 (#18624)flywind2021-08-011-0/+17
| | | | | * fix #18620 * add testcase
* Revert "Make 'echo' raise IOErrors when appropriate (#16367)" (#18460)Miran2021-07-081-11/+0
| | | This reverts commit 23d23ecb081be6702d74024be8f96d92d9f88a59.
* tests/exception/tsetexceptions.nim not joinable (#18264)Timothee Cour2021-06-171-0/+3
|
* Revert "system/excpt: check if the exception is not nil before pop (#18247)" ↵Andreas Rumpf2021-06-171-7/+0
| | | | | (#18265) This reverts commit 0adb47aa15e242983c8251d85367c0fe45fc5f12.
* system/excpt: check if the exception is not nil before pop (#18247)alaviss2021-06-141-0/+7
| | | | | | | | | | In CPS we would consume an exception in the except branch by stashing it into a local then remove the exception from Nim environment so as not to leak it to other code that would be running before the continuation continues However since popCurrentException() assumes that the exception always exist, removing the exception from an except branch will cause a SIGSEGV to happen. This commit fixes that.
* added a test case ensuring exception inference continues to workAraq2021-06-111-0/+32
|
* close #18129 Add setCurrentException for JS backend (#18145)flywind2021-06-011-0/+8
| | | | | | | | | | | * [std/re] make interface consistent * tiny * revert * close #18129 add setCurrentException * changelog entry
* refs #18011 disable some newly failing tests on cpp windows; refs #17946 ↵Timothee Cour2021-05-141-1/+3
| | | | increase timeout for tchannels (#18012)
* Make 'echo' raise IOErrors when appropriate (#16367)Matt Haggard2020-12-181-0/+11
| | | | | | | | | | | | | | | * Make 'echo' raise IOError when fwrite/fflush fail * Fix fwrite return value comparison * Add test for echo raising error and don't fail to release locks in echo * Fix exitcode expectation * Make 'echo' raise IOError on Windows if it fails * Add nimLegacyEchoNoRaise for prior no-IOError echo behavior * Use checkErrMaybe template
* testament: error instead of silently ignore invalid targets; remove ↵Timothee Cour2020-12-141-1/+1
| | | | | | | | | | | pointless alias target vs targets; document matrix; DRY (#16343) * testament: error instead of silently ignore invalid targets * s/target/targets/ * fix test; refs #16344 * address comments * Update testament/specs.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix partially #13115 (now works for cpp; but still fails for js on openbsd) ↵Timothee Cour2020-12-111-10/+36
| | | | | | (#16167) * fix partially #13115 properly (works for c,js,cpp,vm; still fails for js on openbsd) * address comment: also test with -d:danger, -d:debug
* testament: error instead of silently overwrite a spec (#16166)Timothee Cour2020-11-291-5/+4
|
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-282-2/+4
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* fix #13115 (#15930)flywind2020-11-271-0/+13
| | | | | * fix #13115 * fix testament
* fix #10343 (#14789)Timothee Cour2020-06-241-2/+3
|
* fix #14369 (#14386)cooldome2020-05-181-0/+10
| | | | | * fix #14369 * empty commit
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-282-4/+4
| | | | | | | | | | | | | | * Error -> Defect for defects The distinction between Error and Defect is subjective, context-dependent and somewhat arbitrary, so when looking at an exception, it's hard to guess what it is - this happens often when looking at a `raises` list _without_ opening the corresponding definition and digging through layers of inheritance. With the help of a little consistency in naming, it's at least possible to start disentangling the two error types and the standard lib can set a good example here.
* Fix #14091 and #14093 - test failures on NetBSD (#14096)Euan2020-04-241-0/+1
|
* #12103 - CI for OpenBSD (#12105)Euan2020-04-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Working on OpenBSD CI * Condense steps into 2 steps to make output easier to follow. * Move up one directory after csources build. * Remove FreeBSD build manifest and add OpenBSD test ignores for coroutines and hot code reloading. * If runCI fails, run the test results script. * Add email trigger for build failure * Remove .git from repository URL * Disable SFML test on OpenBSD * Disable tgetaddrinfo on OpenBSD as only UDP and TCP protocols are supported. * Remove getFilePermissions as it causes CI test failures with NimScript. * Set clang as cc in nim.cfg and use gmake to build csources. * Add getCurrentDir to nimscript. * Remove duplicate getCurrentDir and check for not weirdTarget. * Add CI badge for OpenBSD. * Disable tests which allocate lots of memory for OpenBSD. * Use `CORO_BACKEND_SETJMP` on OpenBSD rather than ucontext. * Simplify building of koch * Disable t8657 on OpenBSD. See issue #13760. * Fix #12142 - tarray_of_channels fails on OpenBSD * Disable thhtpclient_ssl and tosprocterminate on OpenBSD. These tests can be enabled at a later date after fixing them. * Install libffi. * Set path to libc for openbsd. * Disable tevalffi for now. * Remove tevalffi.nim. * Use ncpuonline sysctl rather than ncpu. * Disable tacceptcloserace and tasynchttpserver on OpenBSD. * Enable tacceptcloserace and tasynchttpserver. * Fix #13775 as suggested by @alaviss - use /bin/cat on OpenBSD rather than /bin/sh. * Enable test on OpenBSD. * Disable tflowvar on OpenBSD.
* faster CIs (#13803)Miran2020-03-301-31/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ttables: smaller table, 5x speedup * thavlak: less iterations, less loops; 30% speedup * tasyncclosestall: shorter timeout; 35% speedup * gcleak4: less iterations, 2x speedup * ttimes: remove deprecated stuff * tdangerisrelease: remove cpp backend, 3x speedup * tfrexp1: smaller range, 2x speedup * trtree: fix warnings, less iterations, 6x speedup * tasyncawait_cyclebreaker: smaller swarm size; 2x speedup * trealloc: smaller number of iterations; 10x speedup * towned_binary_tree: less iterations, 4x speedup * tclosure: remove unused code, less iterations; 2x speedup * twaitany: less durations; 1.4x speedup * tasync_misc: less iterations, 2x speedup * t8535: smaller sleep, 1.5x speedup * tmanyjoin: smaller sleep, 2x speedup * t12221: shorter sleeps, removed two slower tests; 1.6x speedup * tfuturestream: smaller sleep; 1.5x speedup * growobjcrash: less iterations; 2x speedup * ttryrecv: smaller sleep; 1.5x speedup * treusetvar: less threads; 2x speedup * delete tthreadanalysis2, basically a duplicate of tthreadanalysis * t7758: less iterations, 1.5x speedup * tasyncawait: smaller swarm, less messages; 1.5x speedup * tjsandnativeasync: smaller sleep, 1.5x speedup * tpendingcheck: smaller sleep, 1.5x speedup * remove rodfiles test category * move tseq from its own category to 'collections' category * remove unneeded tests and helpers from 'assert' category * stdlib: merge tbitops2 into tbitops * remove 'trepr2' from 'stdlib' cat * merge 'tstreams' into one file * remove 'tinefficient_const_table' from 'ccbugs' cat * merge 'tcollections_to_string' into 'tcollections' * tblocking_channel: smaller sleep, small speedup * tconvexhull: less iterartions; 1.2x speedup * merge 'tdeepcopy2' into 'tdeepcopy' * merge 'tdisjoint_slice2' into 'tdisjoint_slice1' * tmissing_deepcopy: smaller sequence * tsendtwice: smaller arrays; 5x speedup * remove 'tindexerrorformatbounds' * disable multimethod tests * remove 'gc:none' and 'refc' without 'd:useRealtimeGC' from gc tests * koch.nim: bootstrap just with '-d:release', no need for 'csource' * add github workflow for documentation * testament: no need for 8 sub-second decimals
* Attempt to finish off araq cpp exceptions (#13695)cooldome2020-03-191-12/+11
| | | | | | | | | | | | | | | * config update * disable a questionable test * remove c++ exception handling IDs, new impl doesn't require it anymore * C++ based exceptions finally work * fixes bootstrapping problem in C++ mode * teach GCC it's 2020 now * more bugfixes for C++ based exception handling * apply cooldome's patch * another attempt to enable C++11 * bug fix Co-authored-by: Araq <rumpf_a@web.de> Co-authored-by: cooldome <ariabushenko@bk.ru>
* --exception:goto switch for deterministic exception handling (#12977)Andreas Rumpf2020-01-011-1/+35
| | | | | This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior. Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
* fixes #11618 (#11969)Andreas Rumpf2019-08-171-1/+2
|
* fixes #11309 (#11310)Andreas Rumpf2019-05-231-0/+28
|
* revive #10228 (fix #9880) (#10610)Timothee Cour2019-02-132-0/+54
| | | | | | * Make index out of bounds more useful by including the 'bounds'. * fixes #9880 index out of bounds (remaining cases); revives #10228 * change err msg to: `index 3 not in 0 .. 1`
* Rework exception handling in the VM (#10544)LemonBoy2019-02-081-0/+51
| | | | | | | | | | | | | | | | | * Rework exception handling in the VM Make the safepoint handling more precise and less forgiving. The new code is clearer and more commented. Perform cleanup on `return`. The no-exception-thrown case in a try block should be slightly faster since we don't parse the whole set of exceptions every time. More tests. * Fix silly error that broke a few tests * Testament doesn't like files having the same name * Remove test case that failed compilation to js
* Fix semantic analysis with noReturn proc in tail pos (#10422)LemonBoy2019-01-231-0/+10
| | | Fixes #10417
* [CI] now enables `NIM_COMPILE_TO_CPP=true` to run without allow_failures ↵Timothee Cour2019-01-171-0/+2
| | | | | | | | (#10315) * better fix for `nim cpp` bootstrap error: error: no member named raise_id * [CI] now enables runs NIM_COMPILE_TO_CPP=true without allow_failures * workaround refs #10343
* Fix defer not not-working at top level (#10191)Neelesh Chandola2019-01-071-9/+1
|
* require errormsg to be specified before file.Arne Döring2018-12-1112-36/+13
|
* don't raise exception in the default handler (#9783)alaviss2018-11-221-0/+6
| | | fixes #9657
* disable some tests for the C++ target; refs #7870Araq2018-11-151-34/+0
|
* Implements #9434. Minimal Stacktrace for Exceptions in release mode (#9480)cooldome2018-10-281-1/+3
| | | * Fixes #9434
* Merge branch 'Fixes-7845' of https://github.com/cooldome/Nim into ↵Araq2018-10-151-0/+15
|\ | | | | | | cooldome-Fixes-7845
| * Fixescooldome2018-06-121-1/+0
| |
| * Fixes 7845cooldome2018-06-101-0/+16
| |
* | fixes more nil handling regressionsAraq2018-08-131-2/+2
| |
* | make tests green againAndreas Rumpf2018-07-051-2/+2
|/
* Cpp codegen: handling of imported exceptions. Fixes #3571 (#7360)cooldome2018-04-101-0/+134
|
* fixes #7414 (#7434)cooldome2018-03-291-1/+21
|
* Allow only single infix as in except branches. Fixes #7115 (#7132)cooldome2018-03-081-0/+8
|
* make tests green againAraq2018-02-281-1/+0
|
* merged #6512 manually; fixes #6431Araq2018-02-271-0/+1
|
* genTryCpp to catch by Nim type, ready for first review (#7196)cooldome2018-02-123-0/+3
| | | | | | | | | | | | | | | | * Rewrite genTryCpp * correction * Implement polymorphic raise in cpp * revert backticks in emit * Cleanp a comment * revert test changes * better handling of <new> header
* nested finally bug (#7207)cooldome2018-02-121-1/+24
|
* Fix compiler crash on try expression with infix as (Fixes #7116) (#7112)cooldome2018-01-291-1/+9
| | | | | | * Fix compiler crash * make sure type is not lost
* Remove expr/stmt (#5857)Arne Döring2017-07-251-2/+2
|
* make tests green againAraq2017-07-201-5/+2
|
* fixes #5871Andreas Rumpf2017-07-201-3/+14
|