No description
Find a file
Bernd Wachter e41ee54d21 Add optional error handling to si_safe_eval
Currently eql5 has a tendency to deadlock when encountering errors,
especially when executing scripts. The problem is that si_safe_eval
when called without a return flag expects to have errors handled in a
debugger, which does not exist in this case. As a result the lisp
runtime dies, while the code moves on to starting the Qt event loop
with nothing to control it.

This change introduces three flags to control the error handling
behaviour for eval:

- DebugOnError expects a debugger to be there, which is the old
  behaviour. It can be restored by passing -debug-on-error to eql5
- LogOnError will log about the error, but does not handle it. This is
  mainly a placeholder for better error handling in the future -
  without error handling this also results in a deadlock.
- DieOnError is the new default, which logs the code leading to the
  error, and exits with an error code.

Another patch should expose those flags to the Lisp runtime, and make
the error behaviour configurable both at initializing EQL from C++ and
later on during runtime.

A drawback of this change that we only get to see the the expression
triggering the error, not the actual error - that one is thrown away
by safe-eval:
                             #'(lambda (condition)
                                 (declare (ignore condition))
                                 (return-from safe-eval err-value))

I still feel for working with eql5 this is an overall
improvement. Next steps on this issue should include:

- either provide debugger hooks, or override invoke-debugger to behave
  more sensibly
- possibly override/provide a custom variant of safe-eval to print the
  error before returning
- check a few locations to set more sensible defaults, i.e. if
  somebody just runl eql5 without a script they'd probably want to end
  up in the debugger on errors.
2020-11-13 01:11:48 +02:00
debug add '.gdbinit' (recommended settings when running ECL from within gdb) 2019-03-28 21:56:23 +01:00
doc add deploy script example for Windows to docu 2020-09-27 14:52:12 +02:00
examples add note about QLET (important to remember) 2020-09-24 08:44:42 +02:00
helper add missing type QList<QHostAddress> (module :network) 2020-05-07 11:51:30 +02:00
lib revision of 'lib/qml-ui-vars.lisp' 2020-07-30 20:28:40 +02:00
my_app tiny revisions/oversights 2019-03-02 22:51:19 +01:00
Qt_EQL make 'eql5' executable independant from source installation (e.g. for eql5 -qgui, Slime) 2019-02-27 21:47:39 +01:00
Qt_EQL_plugin plugin example: change template from 'dll' to 'plugin' 2019-02-28 20:32:02 +01:00
screenshots review QML screenshot 2017-03-31 21:11:49 +02:00
slime IMPORTANT FIX: change Swank connection style to :SPAWN (old solution is not stable) 2020-04-21 12:48:09 +02:00
src Add optional error handling to si_safe_eval 2020-11-13 01:11:48 +02:00
.gitignore add 'eql5.pro' for simpler build process 2017-04-28 16:07:52 +02:00
LICENSE-1.MIT update license dates 2017-11-05 17:19:06 +01:00
LICENSE-2-MAKE-QIMAGE.txt port of EQL/Qt4 to Qt5 2016-11-25 23:30:38 +01:00
README-1.md mention Arch Linux recipe (thanks to 'VanLaser') 2019-03-22 19:17:55 +01:00
README-2-REBUILD.md update readme 2017-09-14 13:22:58 +02:00
README-3-KNOWN-ISSUES.md build wrapper functions by default (no more optionally) 2017-09-14 13:17:44 +02:00