Commit Graph

6 Commits

Author SHA1 Message Date
Laurent Rineau da0b65d7c9 fix QSJ/C++ exceptions handling
The javascript testsuite passes.
2023-08-24 15:29:23 +02:00
Laurent Rineau 24c7f1b72a Better test files
The "good" test now check that the exception is actually caught, and not
silently ignored.
2016-11-04 12:10:12 +01:00
Laurent Rineau 0fab84ea85 Fix the include() function
and improve the testsuite (check the message of caught assertions).
2016-10-28 17:58:03 +02:00
Laurent Rineau 3a45eb2212 Better test files 2016-10-28 11:17:59 +02:00
Laurent Rineau ed2eae8879 Add a Qt Script lib
- and start with the addition of `include(<filename>)`.
2016-10-26 18:39:22 +02:00
Laurent Rineau 418fbdef69 Better exception handling (with Qt Script)
- Uncaught Qt Script exception are now converted to a C++ exception of
  type `CGAL::Three::Script_exception`.

- With `<CGAL/Three/exceptions.h>` and the use of `QScriptable` and
  `CGAL::Three::wrap_a_call_to_cpp`, if a C++ exception is thrown by a C++
  piece of code that was called from a script, then a Javascript
  exception is thrown, so that a script can have a chance to catch it.

- Add a method `throw_exception()` in the `trivial_plugin`, as well as
  test scripts in `javascript/tests/`, to test that new set of features
  in C++/QtScript exceptions handling.
2016-10-26 18:39:06 +02:00