Commit graph

10 commits

Author SHA1 Message Date
Renaud Casenave-Péré
ec089749b8 Pass argc/argv to Qt before passing it to ecl
QApplication will remove arguments it recognizes but ecl will not detect this
and might reference a no more existent argument
2021-03-23 22:26:19 +01:00
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
Bernd Wachter
b85c3895b8 Allow passing argc to EQL::ini
Current implementation only passes in the first element of argv,
breaking command line argument parsing in scripts executed by eql5.

The eql5 binary now passes all arguments, while custom code can chose
the old or new behaviour, depending on which ini form is used.
2020-11-11 11:32:50 +02:00
polos
ca22ff0254 add convenience function '(eql:qml)' for auto generating vars according to QML item's 'objectName'; bump version number; 2020-07-24 11:45:01 +02:00
polos
b2c280bed4 make 'eql5' executable independant from source installation (e.g. for eql5 -qgui, Slime) 2019-02-27 21:47:39 +01:00
polos
71bc1d3525 unix: add "make install" option for exe, lib, modules (refactor file locations) 2017-04-28 12:05:59 +02:00
polos
64d140c8e3 add module :webengine (tested with Qt 5.8) 2017-03-25 17:03:58 +01:00
polos
1d5f1fcb3f make all modules link on Windows; fix sparse DOS line endings; minor revisions; 2016-12-13 19:52:06 +01:00
polos
03520bb6ec add (port of Qt) example "camera" (multimedia widgets); lots of minor revisions; 2016-12-08 01:23:14 +01:00
polos
0591f54ce8 port of EQL/Qt4 to Qt5 2016-11-25 23:30:38 +01:00