--- scilab-5.1.1.orig/debian/scilab-doc.lintian-overrides +++ scilab-5.1.1/debian/scilab-doc.lintian-overrides @@ -0,0 +1,3 @@ +# Actual documentation files +scilab-doc: extra-license-file usr/share/scilab/modules/umfpack/help/en_US/umf_license.xml +scilab-doc: extra-license-file usr/share/scilab/modules/umfpack/help/en_US/taucs_license.xml --- scilab-5.1.1.orig/debian/scilab.1 +++ scilab-5.1.1/debian/scilab.1 @@ -0,0 +1,84 @@ +.TH "Scilab" "1" "November 18, 2008" +.SH NAME +scilab \- Scientific software package for numerical computations +.SH SYNOPSIS +.B scilab [ -h | -f file | -e instruction | -l lang | -mem n | -nw | -nwni | -nogui | -nb | -ns | -nouserstartup | -version ] +.br +This manual page documents briefly the +.B scilab +commands. +.PP +.SH OPTIONS +A complete list of options is included below. +.TP +.B \-h +Show the list of options. +.TP +.B \-f file +Execute the scilab script given in +.B file +argument. +Not that \-e and \-f options are mutually exclusive. +.TP +.B \-e instruction +Execute the scilab instruction given in +.B instruction +argument. +Not that \-e and \-f options are mutually exclusive. +.TP +.B \-nw +Start Scilab without specialized Scilab Window. +.TP +.B \-nwni +start Scilab without the GUI, graphic and help features (batch mode). +This option disable the need of Java. +.TP +.B \-nogui +start Scilab without user GUI (batch mode). +.TP +.B \-l lang +Launch Scilab in the specified language. The lang must be the locale code +(ie fr_FR, en_US...) +.TP +.B \-nb +Do not display the Scilab banner at starting time. +.TP +.B \-ns +Do not execute scilab.start startup file +.TP +.B \-mem N +Set the initial stacksize +.TP +.B \-nouserstartup +Do not execute the user startup files SCIHOME/.scilab or SCIHOME/scilab.ini. +.TP +.B \-version +Print product version and exit. +.SH FILES +.IR ~/.Scilab//.scilab +The user startup script. +.br +.IR ~/.Scilab//scilab.ini +The user startup script. +.br +.IR ~/.Scilab//configuration.xml +The configuration of the GUI +.br +.IR ~/.Scilab//.history.scilab +The history of commands +.br +.IR SCI/modules/jvm/etc/jvm_options.xml +Options given to the JVM +.br +.IR SCI/etc/modules.xml +List of Scilab modules +.br +.IR SCI/etc/classpath.xml +Where Scilab should load the Java libraries +.br +.IR SCI/etc/librarypath.xml +Where Scilab should look for JNI libraries +.SH AUTHOR +Scilab was written by the Scilab Consortium. +.PP +This manual page was written by Sylvestre Ledru . --- scilab-5.1.1.orig/debian/rules +++ scilab-5.1.1/debian/rules @@ -0,0 +1,123 @@ +#!/usr/bin/make -f +include /usr/share/cdbs/1/rules/buildcore.mk +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +DEB_AUTO_UPDATE_AUTOCONF=yes + +# Detect the arch (with the namming of Sun) +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) + +archdir_map := amd64=amd64 i386=i386 lpia=i386 powerpc=ppc sparc=sparc ia64=ia64 +archdir := $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \ + $(filter $(DEB_HOST_ARCH)=%, $(archdir_map)))) + +JAVA_HOME := /usr/lib/jvm/java-6-openjdk/ + +LD_LIBRARY_PATH = $(JAVA_HOME)/jre/lib/$(archdir)/:/usr/lib/libfakeroot/:$(JAVA_HOME)/jre/lib/$(archdir)/server:$(JAVA_HOME)/jre/lib/$(archdir)/native_threads/:$(DEB_DESTDIR)/usr/lib/scilab/ + +DEB_CONFIGURE_SCRIPT_ENV += PVM_ROOT=/usr/lib/pvm3/ +DEB_CONFIGURE_NORMAL_ARGS += --prefix=$(DEB_CONFIGURE_PREFIX) \ + --with-pvm --with-fftw --enable-relocatable \ + --with-umfpack --enable-build-localization \ + --with-install-help-xml --enable-build-help + +DEB_MAKE_BUILD_TARGET := all doc + +DEB_MAKE_INSTALL_TARGET := install install-data install-html \ + prefix=$(DEB_DESTDIR)/usr \ + bindir=$(DEB_DESTDIR)/usr/bin \ + datadir=$(DEB_DESTDIR)/usr/share/ \ + sharedir=$(DEB_DESTDIR)/usr/share/ \ + docdir=$(DEB_DESTDIR)/usr/share/doc/ + +DEB_DH_MAKESHLIBS_ARGS_scilab-bin = -n + +#DEB_MAKE_CHECK_TARGET = check + + +install/scilab-data:: +# Remove empty directories + find $(DEB_DESTDIR)/usr/share/scilab -type d -empty -delete +# Remove extra license files to make lintian happier +# See debian/copyright for them + rm $(DEB_DESTDIR)usr/share/scilab/modules/*/license.txt + rm $(DEB_DESTDIR)usr/share/scilab/contrib/toolbox_skeleton/license.txt + rm $(DEB_DESTDIR)usr/share/scilab/modules/tclsci/tcl/BWidget-*/LICENSE.txt + rm $(DEB_DESTDIR)usr/share/scilab/modules/tclsci/tcl/sciGUI/license.txt + rm $(DEB_DESTDIR)usr/share/scilab/modules/umfpack/TAUCS_license.txt $(DEB_DESTDIR)usr/share/scilab/modules/umfpack/UMFPACK_license.txt + +# Remove COPYING file + rm $(DEB_DESTDIR)usr/share/scilab/COPYING + +# Remove dead code + rm -rf $(DEB_DESTDIR)usr/share/scilab/modules/helptools/bin $(DEB_DESTDIR)usr/share/scilab/modules/tclsci/demos/tk/timer $(DEB_DESTDIR)usr/share/scilab/modules/intersci/examples/sedprov + +# Management of the tests, help and demos + for dir in $(DEB_DESTDIR)usr/share/scilab/modules/*; do \ + moduleName=`echo $$dir|sed -e "s|.*/\(.*\)|\1|"`; \ + target=$(CURDIR)/debian/scilab-doc/usr/share/scilab/modules/$$moduleName; \ + target_test=$(CURDIR)/debian/scilab-test/usr/share/scilab/modules/$$moduleName; \ +# Move tests in the right package; \ + if test -d $$dir/tests; then \ + mkdir -p $$target_test; \ + mv $$dir/tests $$target_test; \ + fi; \ +# Move the help in the right package; \ + if test -d $$dir/demos -o -d $$dir/help/en_US/; then \ + mkdir -p $$target/help; \ + fi; \ + if test -d $$dir/demos; then \ + mv $$dir/demos $$target; \ + fi; \ + if test -d $$dir/help/en_US; then \ + mv $$dir/help/en_US $$target/help/; \ + fi; \ + if test -d $$dir/help/fr_FR; then \ + mkdir -p $(CURDIR)/debian/scilab-doc-fr/usr/share/scilab/modules/$$moduleName/help; \ + mv $$dir/help/fr_FR $(CURDIR)/debian/scilab-doc-fr/usr/share/scilab/modules/$$moduleName/help/; \ + fi; \ + done + mkdir $(CURDIR)/debian/scilab-doc/usr/share/scilab/modules/helptools/jar/ + mkdir $(CURDIR)/debian/scilab-doc-fr/usr/share/scilab/modules/helptools/jar/ + mv $(CURDIR)/debian/tmp/usr/share/scilab/modules/helptools/jar/scilab_en_US_help.jar $(CURDIR)/debian/scilab-doc/usr/share/scilab/modules/helptools/jar/ + mv $(CURDIR)/debian/tmp/usr/share/scilab/modules/helptools/jar/scilab_fr_FR_help.jar $(CURDIR)/debian/scilab-doc-fr/usr/share/scilab/modules/helptools/jar/ + +binary-install/libscilab-java:: +# Move the javasci lib + mkdir -p $(CURDIR)/debian/libscilab-java/usr/share/java/ + mv debian/tmp/usr/share/scilab/modules/javasci/jar/javasci.jar $(CURDIR)/debian/libscilab-java/usr/share/java/ + rmdir debian/tmp/usr/share/scilab/modules/javasci/jar/ + +# Move icons + mkdir -p $(CURDIR)/debian/scilab/usr/share/scilab/ + mv debian/tmp/usr/share/scilab/icons/ $(CURDIR)/debian/scilab/usr/share/scilab/ + +binary-install/scilab-bin:: +# Remove rpath + for file in $(DEB_DESTDIR)/usr/bin/* ; do \ + chrpath -d $$file; \ + done + for file in $(DEB_DESTDIR)/usr/lib/scilab/*.so; do \ + chrpath -d $$file; \ + done + +# Move binaries + mkdir -p $(CURDIR)/debian/scilab-bin/usr/bin + mv $(CURDIR)/debian/tmp/usr/bin/scilab-bin $(CURDIR)/debian/tmp/usr/bin/intersci $(CURDIR)/debian/scilab-bin/usr/bin/ + if test -s $(CURDIR)/debian/tmp/usr/bin/modelicac; then \ + mv $(CURDIR)/debian/tmp/usr/bin/modelicac $(CURDIR)/debian/scilab-bin/usr/bin/; \ + fi + +install/scilab:: + dh_desktop -p scilab + +clean:: +# Remove empty translation files + [ -s modules/maple2scilab/locales/fr_FR/maple2scilab.po ] || rm -f modules/maple2scilab/locales/fr_FR/maple2scilab.po + [ -s modules/boolean/locales/fr_FR/boolean.po ] || rm -f modules/boolean/locales/fr_FR/boolean.po + [ -s modules/intersci/locales/fr_FR/intersci.po ] || rm -f modules/intersci/locales/fr_FR/intersci.po + [ -s modules/scilab2fortran/locales/fr_FR/scilab2fortran.po ] || rm -f modules/scilab2fortran/locales/fr_FR/scilab2fortran.po + [ -s modules/arnoldi/locales/fr_FR/arnoldi.po ] || rm -f modules/arnoldi/locales/fr_FR/arnoldi.po + [ -s modules/scipad/locales/fr_FR/scipad.po ] || rm -f modules/scipad/locales/fr_FR/scipad.po --- scilab-5.1.1.orig/debian/changelog +++ scilab-5.1.1/debian/changelog @@ -0,0 +1,673 @@ +scilab (5.1.1-6) unstable; urgency=low + + * better install which should really fix the previous bug + (Closes: #528517) + * More feedbacks on the java detection (z_java_debug.diff) + * Enable a default case on the startup about the java detection + (javaruntimedetection.diff) + + -- Sylvestre Ledru Thu, 14 May 2009 16:38:17 +0200 + +scilab (5.1.1-5) unstable; urgency=low + + * install/scilab wasn't called when building binary for other archs. + Therefor not installing correctly everything (Closes: #528517) + * A bad define was causing a silly include (alphabuild.diff) + * uname -m is returning s390x on some s390 archs (s390javadetection.diff) + * manpage of modelicac updated with the information about the + availability of this binary + + -- Sylvestre Ledru Wed, 13 May 2009 14:12:23 +0200 + +scilab (5.1.1-4) unstable; urgency=low + + * librefblas3-dev does not exist (yet). Thanks to Jose Ramon + * Do not stop when ocamlopt is not available on the arch + (ocaml-not-available.diff) + * Provide a clear error message for archs where modelicac compiler is + not available (modelicac-not-available.diff) + * scilab startup script moved from package scilab => scilab-bin (because of + the ocamlopt problem, I cannot predict if modelicac will be available or + not. Therefor, I ship usr/bin/ instead of binary per binary. This will + also simplifies the packaging of Scilab 5.2) + + -- Sylvestre Ledru Tue, 28 Apr 2009 18:47:03 +0200 + +scilab (5.1.1-3) unstable; urgency=low + + * Fix warnings in the manpages (modelicac.1 & scilab.1) + * Fix a few typo in the code (typo.diff) + * Remove some exit() in some libs of Scilab (exitincode.diff) + * Encoding removed from scilab.desktop (it is now the default encoding) + * call_scilab documentation was not correctly loaded (missingaddchapter.diff) + * change of the order of the dependencies of the numerical deps (didn't work + buildd) (Closes: #525935) + * Build-dep atlas3-base-dev renamed to libatlas-base-dev + + -- Sylvestre Ledru Mon, 27 Apr 2009 14:51:57 +0200 + +scilab (5.1.1-2) unstable; urgency=low + + * More windows-devel-file-in-package lintian ignored + * libscilab-java is now in Section: java + * Upload in unstable + * Standards-Version updated to 3.8.1 + * compat & debhelpder dep updated from 4 => 7 + + -- Sylvestre Ledru Wed, 22 Apr 2009 14:58:37 +0200 + +scilab (5.1.1-1) experimental; urgency=low + + [ Christoph Korn ] + * New upstream version. + (patches 64bitsdetection.diff filesWithSpace.diff javaHeadLess.diff + displayStack.diff xmlCleanupParser.diff removed. Applied upstream) + + [ Sylvestre Ledru ] + * Add a patch to manage powerpc detection of the JVM (jvm-powerpc.diff) + * Add a patch to use only fpu_control under Linux & x86 (fpu_control.diff) + + -- Sylvestre Ledru Sun, 19 Apr 2009 16:42:49 +0200 + +scilab (5.1-2) experimental; urgency=low + + [ Sylvestre Ledru ] + * Package scilab-include added (was missing in the previous version) + * sivp added in the recommanded packages (Closes: #505203) + * Replaces: scilab (< 5.0) added in scilab-bin (caused issue in the 4.X + => 5.X upgrade) + * Patch xmlCleanupParser.diff added (fix some problems with the latest + version of libxml... which is not yet present in Debian). + * Add a lintian override for some visual project files + * Copyright update about javasci's examples (public domain now) + * Missing deps on docbook-xsl for scilab-doc + + [ Christoph Korn ] + * debian/patches/filesWithSpace.diff: Removes a space in two filenames. + * debian/rules: Remove empty translation files (Closes LP: #272264) + + -- Sylvestre Ledru Tue, 24 Feb 2009 11:38:38 +0100 + +scilab (5.1-1) experimental; urgency=low + + * New upstream release + * Some patches removed (included upstream) + * Better watch file + * Missing dep to pkg-config + * Patch javaHeadLess.diff added (build Scilab into a chroot) + * Patch 64bitsdetection.diff added (better detection of a 64 bits CPU) + + [ Christoph Korn ] + * ${misc:Depends} added to make lintian happy + * deleted debian/patches/series because quilt is not used as patch system + * Dropped g++ build dependency to make lintian happy. + * debian/control: Changed the unique package descriptions to + make lintian happy. + + -- Sylvestre Ledru Fri, 13 Feb 2009 09:44:31 +0100 + +scilab (5.0.3-6) experimental; urgency=low + + * Integration of a patch to be able to build french without the locale + + -- Sylvestre Ledru Wed, 21 Jan 2009 16:52:36 +0100 + +scilab (5.0.3-5) experimental; urgency=low + + * Add a backported patch from upstream to be able to build the + documentation without the french localization installed on the + system + + -- Sylvestre Ledru Wed, 28 Jan 2009 14:02:06 +0100 + +scilab (5.0.3-4) experimental; urgency=low + + * scilab.desktop wasn't install (thanks again to Christoph Korn) and + and the categories were wrong + + -- Sylvestre Ledru Wed, 07 Jan 2009 12:57:24 +0100 + +scilab (5.0.3-3) experimental; urgency=low + + * Missing dep to ant & docbook-xsl + * Information about the LGPL added in the copyright file + * Force a minimal version of jeuclid + * Install the icon + * Fix a problem in the scilab.desktop file (thanks to Christoph Korn) + * Icons added to the menu item + + -- Sylvestre Ledru Tue, 30 Dec 2008 09:38:59 +0100 + +scilab (5.0.3-2) experimental; urgency=medium + + * Warnings removed on startup + * Tests moved to scilab-test package + + -- Sylvestre Ledru Sat, 22 Nov 2008 10:28:30 +0100 + +scilab (5.0.3-1) experimental; urgency=medium + + * New upstream version (Closes: #483682, #499565, #486876) + Massive changes in the package construction + * Package moved to main since Scilab is free (CeCILL license) + * modelicac, intersci and scilab manpages added + + -- Sylvestre Ledru Fri, 1 Oct 2008 13:37:08 +0200 + +scilab (4.1.2-6) unstable; urgency=low + + * Debian-science added as maintainer + * SVN moved to debian-science repository + * Standards-Version updated to 3.8.0 + * Fix a security issue reported by Dmitry E. Oboukhov. (Closes: #496414) + + -- Sylvestre Ledru Wed, 10 Sep 2008 13:35:28 +0200 + +scilab (4.1.2-5) unstable; urgency=low + + * Add DM-Upload-Allowed: yes to enable uploads for Sylvestre. + + -- Torsten Werner Tue, 29 Apr 2008 20:22:38 +0200 + +scilab (4.1.2-4) unstable; urgency=low + + * Replace g77 by gfortran. + * Improve dependencies on wish and scilab-doc. + * Drop compatibility with versions prior the Etch release. + + -- Torsten Werner Sun, 09 Mar 2008 19:37:55 +0100 + +scilab (4.1.2-3) unstable; urgency=low + + * Add debian/watch. + * Update Homepage and Vcs headers in debian/control. + * Change Standards-Version: 3.7.3. + * Switch to debhelper 5. + + -- Torsten Werner Sun, 16 Dec 2007 23:03:17 +0100 + +scilab (4.1.2-2) unstable; urgency=low + + * Move architecture dependent files from package scilab to scilab-bin. + (Closes: #452461) + * Support binary NMUs. + * Fix desktop and menu files. + + -- Torsten Werner Sun, 25 Nov 2007 17:42:55 +0100 + +scilab (4.1.2-1) unstable; urgency=low + + * New upstream version + + -- Sylvestre Ledru Mon, 22 Oct 2007 14:29:42 +0200 + +scilab (4.1.1-2) unstable; urgency=low + + [ Sylvestre Ledru ] + * Some binaries (name, lib ...) used by Scilab toolboxes were removed. + + [ Aurélien GÉRÔME ] + * Too quick to check/upload previously: lintian errors and + warnings are still there, but are removed upstream in scilab 5. + + -- Sylvestre Ledru Fri, 8 Jun 2007 11:41:12 +0200 + +scilab (4.1.1-1) unstable; urgency=low + + [ Sylvestre Ledru ] + * New upstream version: this version fixes an important bug in the + displaying of some numbers. + * Patch javasci.diff removed: merged upstream. + + [ Aurélien GÉRÔME ] + * Upload to unstable with low urgency. + * Add the correct XS-Vcs-Svn and XS-Vcs-Browser fields in + debian/control. + * All lintian errors and warnings are now fixed upstream. + + -- Aurélien GÉRÔME Tue, 29 May 2007 21:29:02 +0200 + +scilab (4.1-2) unstable; urgency=low + + * Upload to unstable. + + -- Torsten Werner Fri, 13 Apr 2007 19:32:34 +0200 + +scilab (4.1-1) unstable; urgency=medium + + * New upstream version. + * Some patches removed or updated (reported to the upstream) + * Add debian/patches/stack-c.diff to remove the compilation warning "'c1_local' defined but not used" + + -- Sylvestre Ledru Tue, 13 Mar 2007 13:37:08 +0200 + +scilab (4.0-12) unstable; urgency=high + + [ Sylvestre Ledru ] + * Add debian/patches/javasci.diff to translate a comment in English, + because a French accent triggered a FTBFS with gcj-4.1. + + [ Aurélien GÉRÔME ] + * Update debian/patches/build.diff to fix a FTBFS on alpha + architecture: use built-in memory allocation functions on 64-bit + architectures. (Closes: #402736) + * Conform to the policy by using "-g -Wall" in CFLAGS and FFLAGS, + but not touching optimisation flags. + * Disable Java interface by default. + + -- Aurélien GÉRÔME Thu, 14 Dec 2006 23:04:26 +0100 + +scilab (4.0-11) unstable; urgency=medium + + [ Aurélien GÉRÔME ] + * Add Sylvestre and myself to the Uploaders field in debian/control. + * Add the XS-Autobuild field in debian/control. (Closes: #401117) + + [ Torsten Werner ] + * Apply an upstream patch for building on mips and mipsel. + * Set urgency to medium because this fixes a FTBFS bug. + * Switch to external pvm library. + + -- Torsten Werner Wed, 6 Dec 2006 03:42:43 +0100 + +scilab (4.0-10) unstable; urgency=low + + * Configure --without-pvm on mips and mipsel for the moment. + + -- Torsten Werner Tue, 28 Nov 2006 05:58:58 +0100 + +scilab (4.0-9) unstable; urgency=low + + * Prefer autoconf2.50 over autoconf2.13. + * Explicitely specify the path to tcl includes. + * Move patches directory under debian directory. + + -- Torsten Werner Mon, 27 Nov 2006 22:34:41 +0100 + +scilab (4.0-8) unstable; urgency=low + + * Use g77 instead gfortran to compile Scilab because of a bug of gfortran. + (Closes: #397606) + * Fix a bug in compilation of Scilab under GNU/Debian Alpha. + + -- Sylvestre Ledru Wed, 8 Nov 2006 14:37:08 +0200 + +scilab (4.0-7) unstable; urgency=low + + [ Sylvestre Ledru ] + * Fix a bug in the debian patch which was causing a seg fault with 64 bits + CPU. (Closes: #385376) + + [ Torsten Werner ] + * Add XS-X-Vcs-Svn: header to debian/control. + + -- Torsten Werner Fri, 27 Oct 2006 05:37:08 +0200 + +scilab (4.0-6) unstable; urgency=low + + * Changed gettklib.sci to load libtk8.4.so.0 instead libtk8.4.so, change + applied into Scilab official SVN. (Closes: #394377) + + -- Sylvestre Ledru Mon, 23 Oct 2006 15:20:40 +0200 + +scilab (4.0-5) unstable; urgency=low + + * Remove debian/stamp-autoconf in clean:: target. + * Do not ship files called .cvsignore. (Closes: #387870) + * Do not ship binaries needed for build process. (Closes: #392389) + + -- Torsten Werner Sat, 14 Oct 2006 12:48:40 +0200 + +scilab (4.0-4) unstable; urgency=low + + * Make the package binNMUable. + * Make the package portable. + + -- Torsten Werner Sat, 7 Oct 2006 23:44:37 +0200 + +scilab (4.0-3) unstable; urgency=low + + * create symlink for manual directory to /usr/share/doc/... + * doc-base support + * add more Build-Depends + + -- Torsten Werner Wed, 6 Sep 2006 05:03:52 +0200 + +scilab (4.0-2) unstable; urgency=low + + * add bin and pvm3 directories + * use quilt for upstream changes + * add desktop file + * set Standard-Version to 3.7.2, no changes needed + + -- Torsten Werner Sun, 13 Aug 2006 14:00:20 +0200 + +scilab (4.0-1) unstable; urgency=low + + * new upstream version, closes: #321537 + * does not link with readline, closes: #326275, #359886, #361592 + * does not use gtk any more, closes: #302741, #302506 + + -- Torsten Werner Sun, 13 Aug 2006 00:49:31 +0200 + +scilab (3.0-14.1) unstable; urgency=low + + * NMU + * Apply patch to remove -fwritable-strings. Thanks Andreas Jochens. + (closes: #327726) + + -- David Nusinow Sun, 26 Mar 2006 22:40:28 -0500 + +scilab (3.0-14) unstable; urgency=low + + * #undef mips in routines/sun/link.c to enable support for Linux on mips, + closes: #29712 + + -- Torsten Werner Sun, 27 Feb 2005 13:31:56 +0100 + +scilab (3.0-13) unstable; urgency=low + + * added Replaces: scilab (<< 3.0-5) for scilab-bin and scilab-doc, + closes: #289968 + * build against current gcc, closes: #260542 + * remove all .cvsignore files, closes: #163424, #273032 + * create a symlink to man pages into /usr/share/doc/..., + closes: #296216 + + -- Torsten Werner Sat, 26 Feb 2005 16:48:53 +0100 + +scilab (3.0-12) unstable; urgency=low + + * changed configure.in to build scilab's own malloc.o, closes: #255869 + + -- Torsten Werner Sun, 9 Jan 2005 22:58:21 +0100 + +scilab (3.0-11) unstable; urgency=low + + * forgot to run autoconf for last version, closes: #283917 + + -- Torsten Werner Thu, 2 Dec 2004 20:00:42 +0100 + +scilab (3.0-10) unstable; urgency=low + + * fixed configure.in to work on any *-*-linux-gnu system, closes: #281543 + * included a note about licence change and autobuilding in README.Debian + + -- Torsten Werner Tue, 30 Nov 2004 22:34:29 +0100 + +scilab (3.0-9) unstable; urgency=low + + * changed Standards-Version: 3.6.1 + * do not use font 'fixed' any more (last fix undone) + + -- Torsten Werner Mon, 1 Nov 2004 23:59:01 +0100 + +scilab (3.0-8) experimental; urgency=low + + * workaround for libtool problem in Makemex.in and config/Makeso.incl.in, + closes: #260542 + * force font 'fixed' for scilab window, closes: #261966 + * removed file .cvsignore from scilab-bin package, closes: #273032 + + -- Torsten Werner Fri, 22 Oct 2004 20:25:27 +0200 + +scilab (3.0-7) experimental; urgency=low + + * fixed atlas Build-Depends for amd64 + * changed Build-Depends on ocaml-interp (>= 3.08.0) + * added more missing -fPIC + * added --with-tcl-include=/usr/include/tcl8.4 to configure args + + -- Torsten Werner Tue, 17 Aug 2004 22:06:45 +0200 + +scilab (3.0-6) experimental; urgency=low + + * added -fPIC where missing + + -- Torsten Werner Thu, 12 Aug 2004 21:19:40 +0200 + +scilab (3.0-5) experimental; urgency=low + + * changed Build-Depends: libgtkhtml3.1-dev to libgtkhtml2-dev + * removed Build-Depends: libgnome-dev + * added Build-Depends: libreadline4-dev | libreadline-dev + * remove lib*.so, *.dll and examples/mex-examples/mexglx/xtimesy.mexglx in + clean:: target + * moved architecture specific files into new package scilab-bin + * moved demos, examples and man into new package scilab-doc + + -- Torsten Werner Wed, 11 Aug 2004 21:23:30 +0200 + +scilab (3.0-4) experimental; urgency=low + + * removed all macros/**/*.sci and man/**/*.xml files from binary package + * fixed SCI variable in scripts/scilab-gtk.g.in + * readded file 'configure' to installation again + * workaround for incomplete 'make distclean' to really make distclean + + -- Torsten Werner Sat, 24 Jul 2004 12:56:19 +0200 + +scilab (3.0-3) experimental; urgency=low + + * added --with-gtk2 to configure, closes: #260543 + + -- Torsten Werner Thu, 22 Jul 2004 22:05:54 +0200 + +scilab (3.0-2) experimental; urgency=low + + * added Build-Depends: libnum-ocaml-dev, sablotron, closes: #260164 + * removed file 'configure' and directory 'tests' from installation + * changed gettklib.sci to load libtk8.4.so.0 instead libtk8.4.so, closes: #260162 + + -- Torsten Werner Mon, 19 Jul 2004 22:01:45 +0200 + +scilab (3.0-1) experimental; urgency=low + + * new upstream + + -- Torsten Werner Tue, 13 Jul 2004 07:30:16 +0200 + +scilab (2.99rc1-1) experimental; urgency=low + + * new upstream, closes: #257499 + * Build-Depends: tk4-dev, closes: #207870 + + -- Torsten Werner Thu, 8 Jul 2004 23:43:35 +0200 + +scilab (2.7-12) unstable; urgency=low + + * added mips and mips to the platforms that use atlas3 + * fixed compile time errors for platforms that do not use atlas3 + + -- Torsten Werner Tue, 25 May 2004 21:40:04 +0200 + +scilab (2.7-11) unstable; urgency=low + + * added Build-Depends for refblas3-dev + + -- Torsten Werner Tue, 23 Mar 2004 23:28:29 +0100 + +scilab (2.7-10) unstable; urgency=low + + * recompiled with atlas3 instead of atlas2 + + -- Torsten Werner Fri, 27 Feb 2004 22:24:49 +0100 + +scilab (2.7-9) unstable; urgency=low + + * added missing -fPIC to some routines/*/Makefile{,.in}, closes: #227233 + + -- Torsten Werner Tue, 13 Jan 2004 23:22:02 +0000 + +scilab (2.7-8) unstable; urgency=low + + * do not compile blas and lapack any more + * converted static libs to shared libs and linked scilex dynamically + * removed unnessesary *.sci files from binary package + + -- Torsten Werner Sat, 27 Dec 2003 18:07:01 +0100 + +scilab (2.7-7) unstable; urgency=low + + * updated autotools stuff + fixes for ia64 + + -- Torsten Werner Fri, 26 Dec 2003 19:51:57 +0100 + +scilab (2.7-6) unstable; urgency=low + + * fixed building with pbuilder + + -- Torsten Werner Tue, 26 Aug 2003 15:06:12 +0200 + +scilab (2.7-5) unstable; urgency=low + + * build against tk8.3-dev, closes: #200254 + * converted to cdbs + + -- Torsten Werner Tue, 26 Aug 2003 11:30:03 +0200 + +scilab (2.7-4) unstable; urgency=low + + * included fix for buggy chapter button in help window, closes: #191035 + + -- Torsten Werner Sat, 21 Jun 2003 18:03:26 +0200 + +scilab (2.7-3) unstable; urgency=low + + * include libs/ directory, fixed examples/Makefile.in, hopefully + closes: #186519 + * moved examples directory to /usr/share/doc/scilab/ + + -- Torsten Werner Fri, 18 Apr 2003 13:52:40 +0200 + +scilab (2.7-2) unstable; urgency=low + + * do not create /usr/lib/scilab link due to an old dpkg bug, + closes: #184726 + + -- Torsten Werner Fri, 14 Mar 2003 12:41:24 +0100 + +scilab (2.7-1) unstable; urgency=low + + * new upstream, closes: #179938 + * uses upstream provided 'make install' + * removed most of former Debian changes + + -- Torsten Werner Thu, 13 Mar 2003 10:52:03 +0100 + +scilab (2.6-9) unstable; urgency=low + + * install Version.incl into /usr/lib/scilab/ to make scicos happy, + closes: #163361 + + -- Torsten Werner Thu, 17 Oct 2002 14:45:28 +0200 + +scilab (2.6-8) unstable; urgency=low + + * quick hack to work around Bug #149834 to get it build on alpha + + -- Torsten Werner Fri, 9 Aug 2002 09:39:51 +0200 + +scilab (2.6-7) unstable; urgency=low + + * do not build any pvm related stuff, closes: #151919 + + -- Torsten Werner Wed, 10 Jul 2002 07:58:02 +0200 + +scilab (2.6-6) unstable; urgency=low + + * reenabled pvm, added pvm-dev to Build-Depends and pvm to Recommends + * using debians own blas and lapack libraries, closes: #120286 + + -- Torsten Werner Wed, 15 May 2002 13:49:06 +0200 + +scilab (2.6-5) unstable; urgency=low + + * fixed generation of scilab's man page, closes: #144261 + + -- Torsten Werner Tue, 30 Apr 2002 11:56:11 +0200 + +scilab (2.6-4) unstable; urgency=low + + * support for m68k, closes: 138895 + * installs some missing files, closes: 138329 + + -- Torsten Werner Thu, 21 Mar 2002 16:57:43 +0100 + +scilab (2.6-3) unstable; urgency=low + + * fixed SCI variable in scripts/*.g files + + -- Torsten Werner Wed, 27 Feb 2002 12:15:45 +0100 + +scilab (2.6-2) unstable; urgency=low + + * added stack?.h to /usr/lib/scilab/routines/, closes: 122390 + * copied new version of config.sub and config.guess from /usr/share/misc/ to + config/, closes: #46482, #47811 + + -- Torsten Werner Mon, 17 Dec 2001 10:35:49 +0100 + +scilab (2.6-1) unstable; urgency=low + + * configured with argument --without-pvm because pvm support is broken + * #include fix (for powerpc architecture), closes: #111648 + * new maintainer + + -- Torsten Werner Wed, 7 Nov 2001 12:58:04 +0100 + +scilab (2.6-0.1) unstable; urgency=low + + * new upstream, NMU, closes: #93765 + * added build deps, closes: #91282, #71942 + * removed scilab-doc package since documentation is no longer + available in upstream sources, rerun dh_make + * closes old bugs: #27805, #26236, #65452, #71583 + * /usr/share/man fix, closes: #91061 + + -- Torsten Werner Fri, 20 Apr 2001 09:43:52 +0200 + +scilab (2.5-0.1) unstable; urgency=low + + * NMU to update versions + * Wouldn't compile on Alpha and package hadn't been touched in + years apparently. + * Closes alpha-building bugs (closes: Bug#68410) + + -- Christopher C. Chimelis Thu, 3 Aug 2000 16:12:45 -0400 + +scilab (2.4-1) unstable; urgency=low + + * new maintainer + * new upstream version + * apply patch from scilab newsgroup to fix hypermatrix problems + + -- Christian Meder Tue, 30 Jun 1998 21:18:04 +0200 + +scilab (2.2-4) unstable; urgency=low + + * Changed 'scilab' script to correct bug #5500. + + -- Vincent Renardias Sun, 19 Jan 1997 03:09:36 +0100 + +scilab (2.2-3) unstable frozen; urgency=low + + * Added a simlink to make man happy (Corrects bug #5446 ;-) + * Added dependance on 'c-shell' (Corrects bug #5447) + * Added missing 'imp/NperiPos.ps' file (Corrects bug #5448) + * Modified the 'configure' file to build with libc-5.4 + * Changed '.so' links in man pages. + + -- Vincent Renardias Sat, 16 Nov 1996 23:21:39 +0100 + +scilab (2.2-2) unstable; urgency=low + + * Corrected some typos. + + -- Vincent Renardias Sat, 2 Nov 1996 03:05:37 +0100 + +scilab (2.2-1) unstable; urgency=low + + * Initial release. + + -- Vincent Renardias Wed, 9 Oct 1996 21:17:35 +0200 --- scilab-5.1.1.orig/debian/scilab-bin.manpages +++ scilab-5.1.1/debian/scilab-bin.manpages @@ -0,0 +1,3 @@ +debian/intersci.1 +debian/modelicac.1 + --- scilab-5.1.1.orig/debian/scilab.docs +++ scilab-5.1.1/debian/scilab.docs @@ -0,0 +1,3 @@ +README_Unix +ACKNOWLEDGEMENTS + --- scilab-5.1.1.orig/debian/scilab-bin.install +++ scilab-5.1.1/debian/scilab-bin.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/ --- scilab-5.1.1.orig/debian/intersci.1 +++ scilab-5.1.1/debian/intersci.1 @@ -0,0 +1,21 @@ +.TH "intersci" "1" "November 18, 2008" +.SH NAME +intersci \- intersci is a program for building an interface file between Scilab +and C/Fortran functions/subroutines. +.SH SYNOPSIS +.B intersci \fIinterface_file\fP\ 'files'\ 'libs' + +.br +This manual page documents briefly the +.B intersci +commands. +.SH DESCRIPTION +Intersci is a program for building an interface file between Scilab and +Fortran subroutines or C functions. This interface describes both the routine +called and the associated Scilab function. +.PP +See : http://www.scilab.org/doc/intersci.pdf +.SH AUTHOR +Intersci was written by the Scilab Consortium. +.PP +This manual page was written by Sylvestre Ledru . --- scilab-5.1.1.orig/debian/scilab-bin.lintian-overrides +++ scilab-5.1.1/debian/scilab-bin.lintian-overrides @@ -0,0 +1,2 @@ +# the actual binary which should not be called directly +scilab-bin: binary-without-manpage usr/bin/scilab-bin --- scilab-5.1.1.orig/debian/scilab-data.lintian-overrides +++ scilab-5.1.1/debian/scilab-data.lintian-overrides @@ -0,0 +1,15 @@ +# Call Scilab from application... Visual project +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/core/examples/call_scilab/c/visual_studio/CallSciVC.sln +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/core/examples/call_scilab/c/visual_studio/CallSciVC.vcproj +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/core/examples/call_scilab/fortran/example.sln +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/basicExamples/readwriteboolean_vc/readwriteboolean.sln +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/basicExamples/readwriteboolean_vc/readwriteboolean.vcproj +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/basicExamples/readwritecomplexmatrix_vc/readwritecomplexmatrix.sln +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/basicExamples/readwritecomplexmatrix_vc/readwritecomplexmatrix.vcproj +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/basicExamples/readwritewmatrix_vc/readwritematrix.sln +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/basicExamples/readwritewmatrix_vc/readwritematrix.vcproj +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/basicExamples/readwritewtring_vc/readwritestring.sln +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/basicExamples/readwritewtring_vc/readwritestring.vcproj +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/call_scilab/c/visual_studio/CallSciVC.sln +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/call_scilab/c/visual_studio/CallSciVC.vcproj +scilab-data: windows-devel-file-in-package usr/share/scilab/modules/call_scilab/examples/call_scilab/fortran/example.sln --- scilab-5.1.1.orig/debian/scilab.desktop +++ scilab-5.1.1/debian/scilab.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Comment=Scientific software package for numerical computations +Comment[fr]=Logiciel scientifique de calcul numérique +Comment[de]=eine Wissenschaftssoftware für numerische Berechnungen +Exec=scilab +GenericName=Scientific Software Package +GenericName[fr]=Logiciel de calcul numérique +GenericName[de]=Wissenschaftssoftware +Icon=/usr/share/scilab/icons/scilab.xpm +Name=Scilab +Name[de]=Scilab +StartupNotify=false +Terminal=false +Type=Application +Categories=Education;Science;Math;Development;Physics; --- scilab-5.1.1.orig/debian/control +++ scilab-5.1.1/debian/control @@ -0,0 +1,142 @@ +Source: scilab +Section: math +Priority: optional +Maintainer: Debian Science Team +Uploaders: Sylvestre Ledru , Aurélien GÉRÔME , Torsten Werner +Build-Depends: autoconf, cdbs, debhelper (>= 7), cdbs, gfortran, + openjdk-6-jdk, chrpath, ocaml-nox, + tcl8.5-dev, tk8.5-dev, libxml2-dev, libpcre3-dev, + gettext, libreadline-dev, pkg-config, +# numerical libraries + libblas-dev | librefblas3-dev | libatlas-base-dev, liblapack-dev, +# Java deps + libflexdock-java (>= 0.5.1), libjogl-java (>= 1.1.1), + libjrosetta-java (>= 1.0.1), ant, +# Documentation + libjeuclid-core-java (>= 3.1.3), libbatik-java (>= 1.7), fop (>= 0.95), + javahelp2, libsaxon-java, libavalon-framework-java, docbook-xsl, + libxml-commons-external-java, +# Optional Scilab features + pvm-dev, fftw3-dev | libfftw3-dev, libsuitesparse-dev, libmatio-dev +# libxml2-utils, +Standards-Version: 3.8.1 +Homepage: http://www.scilab.org +Vcs-Svn: svn://svn.debian.org/svn/debian-science/packages/scilab/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/debian-science/packages/scilab/trunk/ +DM-Upload-Allowed: yes + +Package: scilab +Architecture: all +Depends: scilab-bin (>= ${source:Version}), + scilab-data (= ${binary:Version}), ${misc:Depends}, + scilab-include (= ${binary:Version}) +# scilab-include is installed by default since it is widely used by many +# toolboxes +Recommends: scilab-doc (= ${binary:Version}), sivp +Suggests: gfortran, gcc +# For the dynamic link +Description: Scientific software package for numerical computations + Scilab is a matrix-based scientific software package. + Scilab contains hundreds of built-in mathematical functions, rich + data structures (including polynomials, rationals,linear systems, lists, + etc...) and comes with a number of specific toolboxes for + control, signal processing, ... + . + +Package: scilab-data +Architecture: all +Depends: ${misc:Depends} +Description: Scientific software package for numerical computations (data files) + Scilab is a matrix-based scientific software package. + Scilab contains hundreds of built-in mathematical functions, rich + data structures (including polynomials, rationals,linear systems, lists, + etc...) and comes with a number of specific toolboxes for + control, signal processing, ... + . + This package contains the data files for Scilab. + + +Package: scilab-include +Architecture: all +Depends: ${misc:Depends} +Description: Scientific software package for numerical computations (include files) + Scilab is a matrix-based scientific software package. + Scilab contains hundreds of built-in mathematical functions, rich + data structures (including polynomials, rationals,linear systems, lists, + etc...) and comes with a number of specific toolboxes for + control, signal processing, ... + . + This package contains the include files for Scilab (used in the dynamic link). + + +Package: scilab-bin +Architecture: any +Depends: ${shlibs:Depends}, scilab-data (= ${source:Version}), + openjdk-6-jre | java2-runtime, + libflexdock-java, libjogl-java (>= 1.1.1), libjrosetta-java (>= 1.0.1), + javahelp2, ${misc:Depends} +Recommends: pvm +Replaces: scilab (< 5.0) +Description: Scientific software package for numerical computations (binary files) + Scilab is a matrix-based scientific software package. + Scilab contains hundreds of built-in mathematical functions, rich + data structures (including polynomials, rationals,linear systems, lists, + etc...) and comes with a number of specific toolboxes for + control, signal processing, ... + . + This package contains the architecture specific binary files. + +Package: libscilab-java +Section: java +Architecture: any +Depends: ${shlibs:Depends}, scilab-bin (= ${binary:Version}), ${misc:Depends} +Description: Scientific software package for numerical computations (Java API) + Scilab is a matrix-based scientific software package. + Scilab contains hundreds of built-in mathematical functions, rich + data structures (including polynomials, rationals,linear systems, lists, + etc...) and comes with a number of specific toolboxes for + control, signal processing, ... + . + This package contains the Java library used to call Scilab's engine + from Java. + +Package: scilab-doc +Section: doc +Depends: libjeuclid-core-java, libbatik-java (>= 1.7), fop (>= 0.95), + libsaxon-java, libavalon-framework-java, docbook-xsl, ${misc:Depends} +Architecture: all +Description: Scientific software package for numerical computations (documentations) + Scilab is a matrix-based scientific software package. + Scilab contains hundreds of built-in mathematical functions, rich + data structures (including polynomials, rationals,linear systems, lists, + etc...) and comes with a number of specific toolboxes for + control, signal processing, ... + . + This package contains demos, examples and man pages. + +Package: scilab-doc-fr +Section: doc +Architecture: all +Depends: scilab-doc, ${misc:Depends} +Description: Scientific software package for numerical computations (french documentations) + Scilab is a matrix-based scientific software package. + Scilab contains hundreds of built-in mathematical functions, rich + data structures (including polynomials, rationals,linear systems, lists, + etc...) and comes with a number of specific toolboxes for + control, signal processing, ... + . + This package contains demos, examples and man pages in French. + + +Package: scilab-test +Architecture: all +Depends: ${misc:Depends} +Description: Scientific software package for numerical computations (test files) + Scilab is a matrix-based scientific software package. + Scilab contains hundreds of built-in mathematical functions, rich + data structures (including polynomials, rationals,linear systems, lists, + etc...) and comes with a number of specific toolboxes for + control, signal processing, ... + . + This package contains the test files (unitary, non regression, + performance ...) for Scilab. --- scilab-5.1.1.orig/debian/scilab.menu +++ scilab-5.1.1/debian/scilab.menu @@ -0,0 +1,14 @@ +?package(scilab):\ + needs="x11"\ + section="Applications/Science/Mathematics"\ + icon="/usr/share/scilab/icons/scilab.xpm" \ + title="Scilab"\ + command="/usr/bin/scilab" + +?package(scilab):\ + needs="text"\ + section="Applications/Science/Mathematics"\ + icon="/usr/share/scilab/icons/scilab.xpm" \ + title="Scilab"\ + command="/usr/bin/scilab -nw" + --- scilab-5.1.1.orig/debian/scilab.install +++ scilab-5.1.1/debian/scilab.install @@ -0,0 +1,2 @@ +debian/tmp/usr/bin/scilab +debian/scilab.desktop usr/share/applications --- scilab-5.1.1.orig/debian/TODO +++ scilab-5.1.1/debian/TODO @@ -0,0 +1,3 @@ +* See what to do with localization files +* Create a binary package (scilab-cli) which doesn't need java +* Use atlas by default instead of blas --- scilab-5.1.1.orig/debian/README.Debian +++ scilab-5.1.1/debian/README.Debian @@ -0,0 +1,11 @@ +scilab for Debian +----------------- + +The homepage of scilab is http://www.scilab.org/ . Please check the +licence of the package if you are about to upload a new upstream version +of the package to the Debian archive. If the licence has changed in a +way that forbids autobuilding the package you have to contact Andreas +Barth before uploading it. + + -- Torsten Werner + --- scilab-5.1.1.orig/debian/orig-tar.sh +++ scilab-5.1.1/debian/orig-tar.sh @@ -0,0 +1,11 @@ +#!/bin/sh -e + +# called by uscan with '--upstream-version' + +# move to directory 'tarballs' +if [ -r .svn/deb-layout ]; then + . .svn/deb-layout + mv $3 $origDir + echo "moved $3 to $origDir" +fi + --- scilab-5.1.1.orig/debian/modelicac.1 +++ scilab-5.1.1/debian/modelicac.1 @@ -0,0 +1,52 @@ +.TH "modelicac" "1" "November 18, 2008" +.SH NAME +modelicac \- modelicac is a compiler for a subset of the Modelica language including parts of the 'equation' subset that can express relations between Real variable. +.SH SYNOPSIS +.B modelicac [-c] [-o ] [ -L directory | -hpath directory | -keep-all-variables | -jac | -no-parameter-removal | -no-simplifs | -trace filename | -xml ] +This manual page documents briefly the +.B modelicac +commands. +Note that modelicac is only available on the platform which are supported by +ocamlopt (ie amd64 hurd-i386 i386 powerpc sparc) +.PP +.SH OPTIONS +A complete list of options is included below. +.TP +.B \-c +Compile only, do not instantiate. Modelicac produces a "*.moc" file when invoked with that option. +.TP +.B \-o outputfile +Set output file name to (this option also works +with \-c option but is somewhat useless because of the class +name restrictions given above). +.TP +.B \-L directory +Add to the list of directories to be searched when +producing a C file (no effect when used with \-c). +.TP +.B \-hpath directory +Specify a path to be added to #include directives in the +generated C code. +.TP +.B \-keep-all-variables + Do not remove any variable from the initial system. +.TP +.B \-jac +Generate analytic jacobian matrix code. +.TP +.B \-no-parameter-removal +Do not remove any parameter +.TP +.B \-no-simplifs +Same as \-keep\-all\-variables \-no\-parameter\-removal +.TP +.B \-trace filename +Generate tracing information for external function calls +into +.TP +.B \-xml +Generate an XML version of the model instead of target code +.SH AUTHOR +Modelicac was written by TNI-Valiosys and Imagineby. +.PP +This manual page was written by Sylvestre Ledru . --- scilab-5.1.1.orig/debian/scilab-data.install +++ scilab-5.1.1/debian/scilab-data.install @@ -0,0 +1,3 @@ +debian/tmp/usr/share/scilab +debian/tmp/usr/share/locale + --- scilab-5.1.1.orig/debian/copyright +++ scilab-5.1.1/debian/copyright @@ -0,0 +1,1502 @@ +This package was debianized by Torsten Werner + and Sylvestre Ledru and others. + +It was downloaded from http://www.scilab.org/ + +Copyright: + + Copyright (c) 2008 (DIGITEO) + Copyright (c) 1989-2008 (INRIA) + Copyright (c) 1989-2007 (ENPC) + +License: + + CeCILL + + + FREE SOFTWARE LICENSING AGREEMENT CeCILL + ======================================== + + +Notice +------ + + +This Agreement is a free software license that is the result of discussions +between its authors in order to ensure compliance with the two main +principles guiding its drafting: + - firstly, its conformity with French law, both as regards the law of + torts and intellectual property law, and the protection that it offers + to authors and the holders of economic rights over software. + - secondly, compliance with the principles for the distribution of free + software: access to source codes, extended user-rights. + +The following bodies are the authors of this license CeCILL (Ce : CEA, C : +CNRS, I : INRIA, LL : Logiciel Libre): + +Commissariat à l'Energie Atomique - CEA, a public scientific, technical and +industrial establishment, having its principal place of business at 31-33 +rue de la Fédération, 75752 PARIS cedex 15, France. + +Centre National de la Recherche Scientifique - CNRS, a public scientific +and technological establishment, having its principal place of business at +3 rue Michel-Ange 75794 Paris cedex 16, France. + +Institut National de Recherche en Informatique et en Automatique - INRIA, a +public scientific and technological establishment, having its principal +place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le +Chesnay cedex. + + +PREAMBLE +-------- + + +The purpose of this Free Software Licensing Agreement is to grant users the +right to modify and redistribute the software governed by this license +within the framework of an "open source" distribution model. + +The exercising of these rights is conditional upon certain obligations for +users so as to ensure that this status is retained for subsequent +redistribution operations. + +As a counterpart to the access to the source code and rights to copy, modify +and redistribute granted by the license, users are provided only with a +limited warranty and the software's author, the holder of the economic +rights, and the successive licensors only have limited liability. + +In this respect, it is brought to the user's attention that the risks +associated with loading, using, modifying and/or developing or reproducing +the software by the user given its nature of Free Software, that may +mean that it is complicated to manipulate, and that also therefore means +that it is reserved for developers and experienced professionals having +in-depth computer knowledge. Users are therefore encouraged to load and test +the Software's suitability as regards their requirements in conditions +enabling the security of their systems and/or data to be ensured and, more +generally, to use and operate it in the same conditions of security. +This Agreement may be freely reproduced and published, provided it is +not altered, and that no Articles are either added or removed herefrom. + +This Agreement may apply to any or all software for which the holder of the +economic rights decides to submit the operation thereof to its provisions. + + +Article 1 - DEFINITIONS +------------------------ + + +For the purposes of this Agreement, when the following expressions commence +with a capital letter, they shall have the following meaning: + +Agreement: means this Licensing Agreement, and any or all of its subsequent +versions. + +Software: means the software in its Object Code and/or Source Code form +and, where applicable, its documentation, "as is" at the time when the +Licensee accepts the Agreement. + +Initial Software: means the Software in its Source Code and/or Object Code +form and, where applicable, its documentation, "as is" at the time when it +is distributed for the first time under the terms and conditions of the +Agreement. + +Modified Software: means the Software modified by at least one +Contribution. + +Source Code: means all the Software's instructions and program lines to +which access is required so as to modify the Software. + +Object Code: means the binary files originating from the compilation of the +Source Code. + +Holder: means the holder of the economic rights over the Initial +Software. + +Licensee(s): mean(s) the Software user(s) having accepted the Agreement. + +Contributor: means a Licensee having made at least one Contribution. + +Licensor: means the Holder, or any or all other individual or legal entity, +that distributes the Software under the Agreement. + +Contributions: mean any or all modifications, corrections, translations, +adaptations and/or new functionalities integrated into the Software by any +or all Contributor, and the Static Modules. + +Module: means a set of sources files including their documentation that, +once compiled in executable form, enables supplementary functionalities or +services to be developed in addition to those offered by the Software. + +Dynamic Module: means any or all module, created by the Contributor, that +is independent of the Software, so that this module and the Software are in +two different executable forms that are run in separate address spaces, +with one calling the other when they are run. + +Static Module: means any or all module, created by the Contributor and +connected to the Software by a static link that makes their object codes +interdependent. This module and the Software to which it is connected, are +combined in a single executable. + +Parties: mean both the Licensee and the Licensor. + +These expressions may be used both in singular and plural form. + + +Article 2 - PURPOSE +------------------- + + +The purpose of the Agreement is to enable the Licensor to grant the +Licensee a free, non-exclusive, transferable and worldwide License for the +Software as set forth in Article 5 hereinafter for the whole term of +protection of the rights over said Software. + + +Article 3 - ACCEPTANCE +---------------------- + + +3.1. The Licensee shall be deemed as having accepted the terms and +conditions of this Agreement by the occurrence of the first of the +following events: +- (i) loading the Software by any or all means, notably, by downloading + from a remote server, or by loading from a physical medium; +- (ii) the first time the Licensee exercises any of the rights granted + hereunder. + +3.2. One copy of the Agreement, containing a notice relating to the +specific nature of the Software, to the limited warranty, and to the +limitation to use by experienced users has been provided to the Licensee +prior to its acceptance as set forth in Article 3.1 hereinabove, and the +Licensee hereby acknowledges that it is aware thereof. + + +Article 4 - EFFECTIVE DATE AND TERM +----------------------------------- + + +4.1. EFFECTIVE DATE + +The Agreement shall become effective on the date when it is accepted by the +Licensee as set forth in Article 3.1. + +4.2. TERM + +The Agreement shall remain in force during the whole legal term of +protection of the economic rights over the Software. + + +Article 5 - SCOPE OF THE RIGHTS GRANTED +--------------------------------------- + + +The Licensor hereby grants to the Licensee, that accepts such, the +following rights as regards the Software for any or all use, and for the +term of the Agreement, on the basis of the terms and conditions set forth +hereinafter. + +Otherwise, the Licensor grants to the Licensee free of charge exploitation +rights on the patents he holds on whole or part of the inventions +implemented in the Software. + +5.1. RIGHTS OF USE + +The Licensee is authorized to use the Software, unrestrictedly, as regards +the fields of application, with it being hereinafter specified that this +relates to: +- permanent or temporary reproduction of all or part of the Software by + any or all means and in any or all form. +- loading, displaying, running, or storing the Software on any or all + medium. +- entitlement to observe, study or test the operation thereof so as to + establish the ideas and principles that form the basis for any or all + constituent elements of said Software. This shall apply when the + Licensee carries out any or all loading, displaying, running, + transmission or storage operation as regards the Software, that it is + entitled to carry out hereunder. + +5.2. entitlement to make CONTRIBUTIONS + +The right to make Contributions includes the right to translate, adapt, +arrange, or make any or all modification to the Software, and the right to +reproduce the resulting Software. + +The Licensee is authorized to make any or all Contribution to the Software +provided that it explicitly mentions its name as the author of said +Contribution and the date of the development thereof. + +5.3. DISTRIBUTION AND PUBLICATION RIGHTS + +In particular, the right of distribution and publication includes the right +to transmit and communicate the Software to the general public on any or +all medium, and by any or all means, and the right to market, either in +consideration of a fee, or free of charge, a copy or copies of the Software +by means of any or all process. +The Licensee is further authorized to redistribute copies of the modified +or unmodified Software to third parties according to the terms and +conditions set forth hereinafter. + +5.3.1. REDISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION + +The Licensee is authorized to redistribute true copies of the Software in +Source Code or Object Code form, provided that said redistribution complies +with all the provisions of the Agreement and is accompanied by: +- a copy of the Agreement, +- a notice relating to the limitation of both the Licensor's warranty + and liability as set forth in Articles 8 and 9, +and that, in the event that only the Software's Object Code is +redistributed, the Licensee allows future Licensees unhindered access to +the Software's full Source Code by providing them with the terms and +conditions for access thereto, it being understood that the additional cost +of acquiring the Source Code shall not exceed the cost of transferring the +data. + +5.3.2. REDISTRIBUTION OF MODIFIED SOFTWARE + +When the Licensee makes a Contribution to the Software, the terms and +conditions for the redistribution of the Modified Software shall then be +subject to all the provisions hereof. + +The Licensee is authorized to redistribute the Modified Software, in Source +Code or Object Code form, provided that said redistribution complies with +all the provisions of the Agreement and is accompanied by: +- a copy of the Agreement, +- a notice relating to the limitation of both the Licensor's warranty + and liability as set forth in Articles 8 and 9, +and that, in the event that only the Modified Software's Object Code is +redistributed, the Licensee allows future Licensees unhindered access to +the Modified Software's full Source Code by providing them with the terms +and conditions for access thereto, it being understood that the additional +cost of acquiring the Source Code shall not exceed the cost of transferring +the data. + + +5.3.3. redistribution OF DYNAMIC MODULES + +When the Licensee has developed a Dynamic Module, the terms and conditions +hereof do not apply to said Dynamic Module, that may be distributed under +a separate Licensing Agreement. + +5.3.4. COMPATIBILITY WITH THE GPL LICENSE + +In the event that the Modified or unmodified Software is included in a code +that is subject to the provisions of the GPL License, the Licensee is +authorized to redistribute the whole under the GPL License. + +In the event that the Modified Software includes a code that is subject to +the provisions of the GPL License, the Licensee is authorized to +redistribute the Modified Software under the GPL License. + + +Article 6 - INTELLECTUAL PROPERTY +---------------------------------- + + +6.1. OVER THE INITIAL SOFTWARE + +The Holder owns the economic rights over the Initial Software. Any or all +use of the Initial Software is subject to compliance with the terms and +conditions under which the Holder has elected to distribute its work and no +one shall be entitled to and it shall have sole entitlement to modify the +terms and conditions for the distribution of said Initial Software. + +The Holder undertakes to maintain the distribution of the Initial Software +under the conditions of the Agreement, for the duration set forth in +article 4.2.. + +6.2. OVER THE CONTRIBUTIONS + +The intellectual property rights over the Contributions belong to the +holder of the economic rights as designated by effective legislation. + +6.3. OVER THE DYNAMIC MODULES + +The Licensee having developed a Dynamic Module is the holder of the +intellectual property rights over said Dynamic Module and is free to choose +the agreement that shall govern its distribution. + +6.4. JOINT PROVISIONS + +6.4.1. The Licensee expressly undertakes: +- not to remove, or modify, in any or all manner, the intellectual + property notices affixed to the Software; +- to reproduce said notices, in an identical manner, in the copies of + the Software. + +6.4.2. The Licensee undertakes not to directly or indirectly infringe the +intellectual property rights of the Holder and/or Contributors and to take, +where applicable, vis-à-vis its staff, any or all measures required to +ensure respect for said intellectual property rights of the Holder and/or +Contributors. + + +Article 7 - RELATED SERVICES +----------------------------- + + +7.1. Under no circumstances shall the Agreement oblige the Licensor to +provide technical assistance or maintenance services for the Software. + +However, the Licensor is entitled to offer this type of service. The +terms and conditions of such technical assistance, and/or such +maintenance, shall then be set forth in a separate instrument. Only the +Licensor offering said maintenance and/or technical assistance services +shall incur liability therefor. + +7.2. Similarly, any or all Licensor shall be entitled to offer to its +Licensees, under its own responsibility, a warranty, that shall only be +binding upon itself, for the redistribution of the Software and/or the +Modified Software, under terms and conditions that it shall decide upon +itself. Said warranty, and the financial terms and conditions of its +application, shall be subject to a separate instrument executed between the +Licensor and the Licensee. + + +Article 8 - LIABILITY +---------------------- + + +8.1. Subject to the provisions of Article 8.2, should the Licensor fail to +fulfill all or part of its obligations hereunder, the Licensee shall be +entitled to claim compensation for the direct loss suffered as a result of +a fault on the part of the Licensor, subject to providing evidence of it. + +8.2. The Licensor's liability is limited to the commitments made under this +Licensing Agreement and shall not be incurred as a result , in particular: +(i) of loss due the Licensee's total or partial failure to fulfill its +obligations, (ii) direct or consequential loss due to the Software's use or +performance that is suffered by the Licensee, when the latter is a +professional using said Software for professional purposes and (iii) +consequential loss due to the Software's use or performance. The Parties +expressly agree that any or all pecuniary or business loss (i.e. loss of +data, loss of profits, operating loss, loss of customers or orders, +opportunity cost, any disturbance to business activities) or any or all +legal proceedings instituted against the Licensee by a third party, shall +constitute consequential loss and shall not provide entitlement to any or +all compensation from the Licensor. + + +Article 9 - WARRANTY +--------------------- + + +9.1. The Licensee acknowledges that the current situation as regards +scientific and technical know-how at the time when the Software was +distributed did not enable all possible uses to be tested and verified, nor +for the presence of any or all faults to be detected. In this respect, the +Licensee's attention has been drawn to the risks associated with loading, +using, modifying and/or developing and reproducing the Software that are +reserved for experienced users. + +The Licensee shall be responsible for verifying, by any or all means, the +product's suitability for its requirements, its due and proper functioning, +and for ensuring that it shall not cause damage to either persons or +property. + +9.2. The Licensor hereby represents, in good faith, that it is entitled to +grant all the rights on the Software (including in particular the rights +set forth in Article 5 hereof over the Software). + +9.3. The Licensee acknowledges that the Software is supplied "as is" by the +Licensor without any or all other express or tacit warranty, other than +that provided for in Article 9.2 and, in particular, without any or all +warranty as to its market value, its secured, innovative or relevant +nature. + +Specifically, the Licensor does not warrant that the Software is free from +any or all error, that it shall operate continuously, that it shall be +compatible with the Licensee's own equipment and its software +configuration, nor that it shall meet the Licensee's requirements. + +9.4. The Licensor does not either expressly or tacitly warrant that the +Software does not infringe any or all third party intellectual right +relating to a patent, software or to any or all other property right. +Moreover, the Licensor shall not hold the Licensee harmless against any or +all proceedings for infringement that may be instituted in respect of the +use, modification and redistribution of the Software. Nevertheless, should +such proceedings be instituted against the Licensee, the Licensor shall +provide it with technical and legal assistance for its defense. Such +technical and legal assistance shall be decided upon on a case-by-case +basis between the relevant Licensor and the Licensee pursuant to a +memorandum of understanding. The Licensor disclaims any or all liability as +regards the Licensee's use of the Software's name. No warranty shall be +provided as regards the existence of prior rights over the name of the +Software and as regards the existence of a trademark. + + +Article 10 - TERMINATION +------------------------- + + +10.1. In the event of a breach by the Licensee of its obligations +hereunder, the Licensor may automatically terminate this Agreement thirty +(30) days after notice has been sent to the Licensee and has remained +ineffective. + +10.2. The Licensee whose Agreement is terminated shall no longer be +authorized to use, modify or distribute the Software. However, any or all +licenses that it may have granted prior to termination of the Agreement +shall remain valid subject to their having been granted in compliance with +the terms and conditions hereof. + + +Article 11 - MISCELLANEOUS PROVISIONS +-------------------------------------- + + +11.1. EXCUSABLE EVENTS + +Neither Party shall be liable for any or all delay, or failure to perform +the Agreement, that may be attributable to an event of force majeure, an +act of God or an outside cause, such as, notably, defective functioning, or +interruptions affecting the electricity or telecommunications networks, +blocking of the network following a virus attack, the intervention of the +government authorities, natural disasters, water damage, earthquakes, fire, +explosions, strikes and labor unrest, war, etc. + +11.2. The fact that either Party may fail, on one or several occasions, to +invoke one or several of the provisions hereof, shall under no +circumstances be interpreted as being a waiver by the interested Party of +its entitlement to invoke said provision(s) subsequently. + +11.3. The Agreement cancels and replaces any or all previous agreement, +whether written or oral, between the Parties and having the same purpose, +and constitutes the entirety of the agreement between said Parties +concerning said purpose. No supplement or modification to the terms and +conditions hereof shall be effective as regards the Parties unless it is +made in writing and signed by their duly authorized representatives. + +11.4. In the event that one or several of the provisions hereof were to +conflict with a current or future applicable act or legislative text, said +act or legislative text shall take precedence, and the Parties shall make +the necessary amendments so as to be in compliance with said act or +legislative text. All the other provisions shall remain effective. +Similarly, the fact that a provision of the Agreement may be null and +void, for any reason whatsoever, shall not cause the Agreement as a whole +to be null and void. + +11.5. LANGUAGE + +The Agreement is drafted in both French and English. In the event of a +conflict as regards construction, the French version shall be deemed +authentic. + + +Article 12 - NEW VERSIONS OF THE AGREEMENT +------------------------------------------- + + +12.1. Any or all person is authorized to duplicate and distribute copies of +this Agreement. + +12.2. So as to ensure coherence, the wording of this Agreement is protected +and may only be modified by the authors of the License, that reserve the +right to periodically publish updates or new versions of the Agreement, +each with a separate number. These subsequent versions may address new issues +encountered by Free Software. + +12.3. Any or all Software distributed under a given version of the +Agreement may only be subsequently distributed under the same version of +the Agreement, or a subsequent version, subject to the provisions of +article 5.3.4. + + +Article 13 - GOVERNING LAW AND JURISDICTION +------------------------------------------- + + +13.1. The Agreement is governed by French law. The Parties agree to +endeavor to settle the disagreements or disputes that may arise during the +performance of the Agreement out-of-court. + +13.2. In the absence of an out-of-court settlement within two (2) months as +from their occurrence, and unless emergency proceedings are necessary, the +disagreements or disputes shall be referred to the Paris Courts having +jurisdiction, by the first Party to take action. + + + Version 1.1 of 10/26/2004 + +Some third party libraires have been heavely +modified and incorporated into the source tree. Licenses are compatible. +Upstream is planning to remove this. + +Scilab is split in modules. + +On Debian systems +The complete text of the GNU Lesser General Public License +can be found in /usr/share/common-licenses/LGPL. +The complete text of the GNU General Public License can be found in +/usr/share/common-licenses/GPL +The complete text of the Artistic License can be found in +/usr/share/common-licenses/Artistic +The complete text of the BSD License can be found in +/usr/share/common-licenses/BSD + +Here is the list of other licenses by libs: + +----- Libs: MALLOC ----- + +Files: +src/malloc.c + +Copyright: +1990, 1994 by AT&T, Lucent Technologies and Bellcore. + +License: +Permission to use, copy, modify, and distribute this software +and its documentation for any purpose and without fee is hereby +granted, provided that the above copyright notice appear in all +copies and that both that the copyright notice and this +permission notice and warranty disclaimer appear in supporting +documentation, and that the names of AT&T, Bell Laboratories, +Lucent or Bellcore or any of their entities not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +AT&T, Lucent and Bellcore disclaim all warranties with regard to +this software, including all implied warranties of +merchantability and fitness. In no event shall AT&T, Lucent or +Bellcore be liable for any special, indirect or consequential +damages or any damages whatsoever resulting from loss of use, +data or profits, whether in an action of contract, negligence or +other tortious action, arising out of or in connection with the +use or performance of this software. + +----- Libs: doublylinkedlist ----- + +Files: +src/*.c + +Copyright: 2006 Daniel Lacroix + +License: +Public domain + +----- Libs: hashtable ----- + +Files: +hashtable.c hashtable.h hashtable_itr.c hashtable_itr.h +hashtable_private.h hashtable_utility.c hashtable_utility.h + +Copyright: 2002-2004 Christopher Clark + +License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the original author; nor the names of any contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +----- Libs: libst ----- + +Files: +hashtable.c hashtable.h hashtable_itr.c hashtable_itr.h +hashtable_private.h hashtable_utility.c hashtable_utility.h + +Copyright: +1989 Jef Poskanzer +1989 Joe Campbell +1991 Lance Norskog + +License: +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. This software is provided "as is" without express or +implied warranty. + +Here is the list of other licenses by modules: + + +----- Module: arnoldi ----- + +ARPACK +====== + +Files: +src/arpack/* + +Copyright: + +See also the file regarding the clarification on arpack license by +D. Lorensen. + +License: +Rice BSD Software License + +Permits source and binary redistribution of the software ARPACK and +P_ARPACK for both non-commercial and commercial use. + +Copyright (©) 2001, Rice University +Developed by D.C. Sorensen, R.B. Lehoucq, C. Yang, and K. Maschhoff. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* If you modify the source for these routines we ask that you change + the name of the routine and comment the changes made to the + original. + +* Written notification is provided to the developers of intent to use + this software. Also, we ask that use of ARPACK is properly cited in + any resulting publications or software documentation. + +* Neither the name of Rice University (RICE) nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY RICE AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RICE OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +----- Module: cacsd ----- +Slicot: +======= + +Files: +src/slicot/* + +sci_gateway/fortran/{sci_f_sident.f,sci_f_sorder.f,sci_f_findbd.f} + +Copyright: +WGS (Working Group on Software) - Slicot project + +License: +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, +Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +Slatec: +======= + +Files: +src/fortran/dgeco.f + +Copyright: + +License: +This is public domain software. + +C The SLATEC Common Mathematical Library is issued by the following +C Air Force Weapons Laboratory, Albuquerque +C Lawrence Livermore National Laboratory, Livermore +C Los Alamos National Laboratory, Los Alamos +C National Institute of Standards and Technology, Washington +C National Energy Research Supercomputer Center, Livermore +C Oak Ridge National Laboratory, Oak Ridge +C Sandia National Laboratories, Albuquerque +C Sandia National Laboratories, Livermore +C All questions concerning the distribution of the library should be +C directed to the NATIONAL ENERGY SOFTWARE CENTER, 9700 Cass Ave., +C Argonne, Illinois 60439, and not to the authors of the subprograms. +C This material was prepared as an account of work sponsored by the +C United States Government. Neither the United States, nor the +C Department of Energy, nor the Department of Defense, nor any of +C their employees, nor any of their contractors, subcontractors, or +C their employees, makes any warranty, expressed or implied, or +C assumes any legal liability or responsibility for the accuracy, +C completeness, or usefulness of any information, apparatus, product, +C or process disclosed, or represents that its use would not infringe +C upon privately owned rights. + + +Linpack: +======== + + +Files: +src/fortran/{dqrdc.f,wgesl.f,dqrsm.f,qvalz.f,qhesz.f,dqrsl.f,wgeco.f,hhdml.f, dgedi + +Copyright: + +License: +BSD +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed at the University of Tennessee, Knoxville, Innovative Computing Laboratories. + 4. The name of the University, the name of the Laboratory, or the names of its contributors may not be used to endorse or promote products derived from this software without specific written permission. + + +Misc: +===== + +Files: +src/fortran/{dfrmg.f,ricd.f,dhetr.f,rilac.f} + +Copyright: +Alan j. Laub + +License: +Domain public + +Files: +src/fortran/sszer.f + +Copyright: +A.Emami-Naeini + +License: +Domain public + +Files: +src/fortran/shrslv.f + +Copyright: +Bartels and Stewart + +License: +Domain public + +----- Module: call_scilab ----- + +Examples: +========= + +Files: examples/ + +Copyright: +Copyright (c) 2008-2009 - DIGITEO +Copyright (c) 1989-2008 - INRIA +Copyright (c) 1989-2007 - ENPC + +Licenses: +Public domain + +----- Module: core ----- + +getdynamicdebuginfo: +==================== + +Files: src/c/getdynamicdebuginfo.c + +Copyright: Albert Cahalan + +License: +LGPL + +md5: +==== + +Files: src/c/md5.c + +Copyright: L. Peter Deutsch + +License: + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution.----- Module: data_structures ----- +Copyright: +Copyright (c) 2008 - DIGITEO +Copyright (c) 1989-2008 - INRIA +Copyright (c) 1989-2007 - ENPC + +License: +This module must be used under the terms of the CeCILL. +This module file is licensed as described in the file COPYING, which +you should have received as part of this distribution. The terms +are also available at +http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + + +Misc: +===== + +Files: src/c/hmops.c + +Copyright: Bruno Pincon + +License: +CeCILL + +----- Module: dynamic_link ----- + +Examples: +========= + +Files: examples/ + +Copyright: +Copyright (c) 2008 - DIGITEO +Copyright (c) 1989-2008 - INRIA +Copyright (c) 1989-2007 - ENPC + +Licenses: +Public domain + +----- Module: elementary_functions ----- + +Slatec: +======= + +Files: +src/fortran/slatec/ + +Copyright: + +License: +This is public domain software. + +C The SLATEC Common Mathematical Library is issued by the following +C Air Force Weapons Laboratory, Albuquerque +C Lawrence Livermore National Laboratory, Livermore +C Los Alamos National Laboratory, Los Alamos +C National Institute of Standards and Technology, Washington +C National Energy Research Supercomputer Center, Livermore +C Oak Ridge National Laboratory, Oak Ridge +C Sandia National Laboratories, Albuquerque +C Sandia National Laboratories, Livermore +C All questions concerning the distribution of the library should be +C directed to the NATIONAL ENERGY SOFTWARE CENTER, 9700 Cass Ave., +C Argonne, Illinois 60439, and not to the authors of the subprograms. +C This material was prepared as an account of work sponsored by the +C United States Government. Neither the United States, nor the +C Department of Energy, nor the Department of Defense, nor any of +C their employees, nor any of their contractors, subcontractors, or +C their employees, makes any warranty, expressed or implied, or +C assumes any legal liability or responsibility for the accuracy, +C completeness, or usefulness of any information, apparatus, product, +C or process disclosed, or represents that its use would not infringe +C upon privately owned rights. + + + +calerf: +======= + +File: src/fortran/calerf.f + +Copyright: +Takuya OOURA, Research Institute for Mathematical Sciences +Kyoto University, Kyoto 606-01 Japan + +License: +You may use, copy, modify this code for any purpose and without fee. +See http://www.kurims.kyoto-u.ac.jp/~ooura/index.html + + +qsort: +====== + +File: src/c/qsort.c + +Copyright: +The Regents of the University of California. + +License: +BSD license + +Linpack: +======== + +Files: +src/c/unsfdcopy.c, src/fortran/linpack/{dgefa.f,dgesl.f,icopy.f,pade.f,wcopy.f,wpade.f} + +Copyright: +1978-1993 - Jack Dongarra + +License: +BSD +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed at the University of Tennessee, Knoxville, Innovative Computing Laboratories. + 4. The name of the University, the name of the Laboratory, or the names of its contributors may not be used to endorse or promote products derived from this software without specific written permission. + +Eispack: +======== + +Files: src/fortran/hqror2.f + +Copyright: +1983 - Burton s. Garbow + +License: +Public domain + +----- Module: javasci ----- + +Examples: +========= + +Files: examples/ + +Copyright: +Copyright (c) 2008-2009 - DIGITEO +Copyright (c) 1989-2008 - INRIA +Copyright (c) 1989-2007 - ENPC + +Licenses: +Public domain + +----- Module: fftw ----- + +FFTW3: +====== + +Files: +src/c/fftw3.h + +Copyright: +2003, 2006 Matteo Frigo +2003, 2006 Massachusetts Institute of Technology + +License: + * The following statement of license applies *only* to this header file, + * and *not* to the other files distributed with FFTW or derived therefrom: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +----- Module: graphic_export ----- + +GL2PS: +====== +Files: src/c/gl2ps/gl2ps.c src/c/gl2ps/gl2ps.h + +Copyright: +Copyright (C) 2003, Christophe Geuzaine + +License: +LGPL + +See: http://www.geuz.org/gl2ps/COPYING.LGPL +----- Module: interpolation ----- + +Slatec: +======= + +Files: +src/fortran/slatec/{pchim.f, dtensbs.f} + +Copyright: + +License: +This is public domain software. + +C The SLATEC Common Mathematical Library is issued by the following +C Air Force Weapons Laboratory, Albuquerque +C Lawrence Livermore National Laboratory, Livermore +C Los Alamos National Laboratory, Los Alamos +C National Institute of Standards and Technology, Washington +C National Energy Research Supercomputer Center, Livermore +C Oak Ridge National Laboratory, Oak Ridge +C Sandia National Laboratories, Albuquerque +C Sandia National Laboratories, Livermore +C All questions concerning the distribution of the library should be +C directed to the NATIONAL ENERGY SOFTWARE CENTER, 9700 Cass Ave., +C Argonne, Illinois 60439, and not to the authors of the subprograms. +C This material was prepared as an account of work sponsored by the +C United States Government. Neither the United States, nor the +C Department of Energy, nor the Department of Defense, nor any of +C their employees, nor any of their contractors, subcontractors, or +C their employees, makes any warranty, expressed or implied, or +C assumes any legal liability or responsibility for the accuracy, +C completeness, or usefulness of any information, apparatus, product, +C or process disclosed, or represents that its use would not infringe +C upon privately owned rights. + +----- Module: linear_algebra ----- + +Slicot: +======= + +Files: +src/slicot/* + +sci_gateway/fortran/{sci_f_sident.f,sci_f_sorder.f,sci_f_findbd.f} + +Copyright: +WGS (Working Group on Software) - Slicot project + +License: +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software Foundation, +Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +Lapack: +======= + +Files: +src/fortran/DGELSY1.f + +Copyright: +Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., +Courant Institute, Argonne National Lab, and Rice University +June 30, 1999 + +License: +LAPACK is a freely-available software package. It is available from +netlib via anonymous ftp and the World Wide Web. Thus, it can be +included in commercial software packages (and has been). We only ask +that proper credit be given to the authors. + +Like all software, it is copyrighted. It is not trademarked, but we do +ask the following: + +If you modify the source for these routines we ask that you change the +name of the routine and comment the changes made to the original. + +We will gladly answer any questions regarding the software. If a +modification is done, however, it is the responsibility of the person +who modified the routine to provide support. + +----- Module: optimization ----- + +SP: +=== + +File: src/c/sp.c + +Copyright: +1994 by Lieven Vandenberghe and Stephen Boyd. + +License: +Permission to use, copy, modify, and distribute this software for +any purpose without fee is hereby granted, provided that this entire +notice is included in all copies of any software which is or includes +a copy or modification of this software and in all copies of the +supporting documentation for such software. +This software is being provided "as is", without any express or +implied warranty. In particular, the authors do not make any +representation or warranty of any kind concerning the merchantability +of this software or its fitness for any particular purpose. + +Minpack: +======== + +Files: src/fortran/minpack/* + +Copyright: +Jorge More' , Burt Garbow, and Ken Hillstrom at +Argonne National Laboratory. +1999 University of Chicago. All rights reserved + +License: +Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the +following conditions are met: + +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the following +disclaimer. + +2. Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials +provided with the distribution. + +3. The end-user documentation included with the +redistribution, if any, must include the following +acknowledgment: + + "This product includes software developed by the + University of Chicago, as Operator of Argonne National + Laboratory. + + +qpgen2: +======= + +Files: src/fortran/{qpgen2.f, qpgen1sci.f} + +Copyright: +1995 Berwin A. Turlach + +License: +GPL + +----- Module: polynomials ----- + +Eispack: +======== + +Files: src/fortran/balbak.f + +Copyright: +1983 - Burton s. Garbow + +License: +Public domain + +----- Module: randlib ----- + +mt: +=== + +File: src/c/mt.c + +Copyright: +1997, 1999 Makoto Matsumoto and Takuji Nishimura. + +License: +Artistic license + +Freemat: +======== + +File: src/c/{ignbin.c, genbet.c, ignpoi.c, sgamma.c, sexpo.c} + +Copyright: +2002-2004 Samit Basu + +License: +BSD + +kiss: +===== + +File: src/c/kiss.c + +Copyright: +G. Marsaglia + +License: +Public domain + +----- Module: scicos_blocks ----- +SCICOS: +======= + +Files: * + +Copyright: +INRIA + +License: +GPL +----- Module: scicos ----- +SCICOS: +======= + +Files: * + +Copyright: +INRIA + +License: +GPL + +Sundials: +========= + +Files: src/scicos_sundials/* + +Copyright: +2002, The Regents of the University of California. +Produced at the Lawrence Livermore National Laboratory +Written by A.C. Hindmarsh and R. Serban. +UCRL-CODE-155950 +All rights reserved. + +License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the disclaimer below. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the disclaimer (as noted below) +in the documentation and/or other materials provided with the +distribution. + +3. Neither the name of the UC/LLNL nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +----- Module: scipad ----- +Copyright: +2002 - INRIA - Matthieu Philippe +2003-2006 - Weizmann Institute of Science - Enrico Segre +2004-2008 - Francois Vogel + +License: +GPL + +----- Module: sound ----- + +Misc: +===== + +Files: src/c/wav.c src/c/sox.c src/c/raw.c + +Copyright: +1992 Rick Richardson +1991 Lance Norskog And Sundry Contributors + +License: +This source code is freely redistributable and may be used for +any purpose. This copyright notice must be maintained. +Lance Norskog And Sundry Contributors are not responsible for +the consequences of using this software. +----- Module: sparse ----- + +sp: +=== + +Files: src/c/{spFortran.c, spSolve.c, spFactor.c, spOutput.c, spUtils.c, +spBuild.c, spAllocate.c} + +Copyright: +1985,86,87,88 Kenneth S. Kundert and the University of California. + +License: +BSD like +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and supporting +documentation and that the authors and the University of California +are properly credited. The authors and the University of California +make no representations as to the suitability of this software for +any purpose. It is provided `as is', without express or implied warranty. + +----- Module: spreadsheet ----- + +Ripole: +======= + +Files: src/c/ripole/* + +Copyright: +2003, PLD + +License: + +Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the +following conditions are met: + +* Redistributions of source code must retain the above +copyright notice, this list of conditions and the following +disclaimer. + +* Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following +disclaimer in the documentation and/or other materials provided +with the distribution. + +* Neither the name of the PLD nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +----- Module: string ----- + +PCRE: +===== + +Files: +src/c/pcre_tables.c + +Copyright: +1997-2007 - University of Cambridge - Philip Hazel + +License: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the University of Cambridge nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +----- Module: tclsci ----- + +BWidget: +======== + +Files: tcl/BWidget-*/ + +Copyright +1998-1999 UNIFIX. +2001-2002 ActiveState Corp. + +License: +X11 +The following terms apply to all files associated with the software +unless explicitly disclaimed in individual files. + +The authors hereby grant permission to use, copy, modify, distribute, +and license this software and its documentation for any purpose, provided +that existing copyright notices are retained in all copies and that this +notice is included verbatim in any distributions. No written agreement, +license, or royalty fee is required for any of the authorized uses. +Modifications to this software may be copyrighted by their authors +and need not follow the licensing terms described here, provided that +the new terms are clearly indicated on the first page of each file where +they apply. + +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY +FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY +DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE +IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE +NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +MODIFICATIONS. + +GOVERNMENT USE: If you are acquiring this software on behalf of the +U.S. government, the Government shall have only "Restricted Rights" +in the software and related documentation as defined in the Federal +Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you +are acquiring the software on behalf of the Department of Defense, the +software shall be classified as "Commercial Computer Software" and the +Government shall have only "Restricted Rights" as defined in Clause +252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the +authors grant the U.S. Government and others acting in its behalf +permission to use and distribute the software in accordance with the +terms specified in this license. + + +sciGUI: +======= + +Files: tcl/sciGUI/* + +Copyright: +2004 Jaime Urzua Grez + +License: +GPL + + +----- Module: umfpack ----- +UMFPACK: +======== + +Files: * + +Copyright: +Bruno Pinçon, ESIAL-IECN, Inria CORIDA project +Some contributions from Antonio Manoel Ferreria Frasson, +Universidade Federal do Espírito Santo, Brazil. + (file intscispt.c) + +License: +CeCILL + + http://www.iecn.u-nancy.fr/~pincon/scilab/scilab.html + + +TAUCS: +====== + +Files: src/c/{taucs_scilab.h, taucs_scilab.c} + +Copyright: +2001, 2002, 2003 by Sivan Toledo, Tel-Aviv Univesity, stoledo@tau.ac.il. + +License: +Permission is hereby granted to use or copy this program, provided that +the Copyright, this License, and the Availability of the original version +is retained on all copies. User documentation of any code that uses this +code or any derivative code must cite the Copyright, this License, the +Availability note, and "Used by permission." If this code or any +derivative code is accessible from within MATLAB, then typing +"help taucs" must cite the Copyright, and "type taucs" must also cite +this License and the Availability note. Permission to modify the code +and to distribute modified code is granted, provided the Copyright, +this License, and the Availability note are retained, and a notice +that the code was modified is included. This software is provided to +you free of charge. --- scilab-5.1.1.orig/debian/scilab-doc.links +++ scilab-5.1.1/debian/scilab-doc.links @@ -0,0 +1 @@ +usr/lib/scilab/man usr/share/doc/scilab-doc/man --- scilab-5.1.1.orig/debian/scilab.manpages +++ scilab-5.1.1/debian/scilab.manpages @@ -0,0 +1 @@ +debian/scilab.1 --- scilab-5.1.1.orig/debian/watch +++ scilab-5.1.1/debian/watch @@ -0,0 +1,5 @@ +version=3 + +http://www.scilab.org/download/index_download.php \ + .*/scilab-([\d\.]+)-src.tar.gz debian debian/orig-tar.sh + --- scilab-5.1.1.orig/debian/compat +++ scilab-5.1.1/debian/compat @@ -0,0 +1 @@ +7 --- scilab-5.1.1.orig/debian/scilab-include.install +++ scilab-5.1.1/debian/scilab-include.install @@ -0,0 +1 @@ +debian/tmp/usr/include/scilab --- scilab-5.1.1.orig/debian/patches/jvm-powerpc.diff +++ scilab-5.1.1/debian/patches/jvm-powerpc.diff @@ -0,0 +1,491 @@ +--- scilab-5.1.1.obsolete.0.483493411521525/configure 2009-04-14 09:30:40.000000000 +0200 ++++ scilab-5.1.1/configure 2009-04-21 11:34:11.000000000 +0200 +@@ -10458,8 +10458,9 @@ + # FIXME: we rely on the cache variable name because + # there is no other way. + set dummy $CC +-ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then ++am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` ++eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o ++if test "$am_t" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. +@@ -11444,7 +11445,7 @@ + $as_echo_n "checking to see if the java compiler works... " >&6; } + + cat << \EOF > conftest.java +-// #line 11447 "configure" ++// #line 11448 "configure" + + + public class conftest { +@@ -11494,7 +11495,7 @@ + if test "x$ac_java_jvm_name" = "x" ; then + + cat << \EOF > conftest.java +-// #line 11497 "configure" ++// #line 11498 "configure" + import gnu.java.io.EncodingManager; + + public class conftest { +@@ -11542,7 +11543,7 @@ + + + cat << \EOF > conftest.java +-// #line 11545 "configure" ++// #line 11546 "configure" + import java.nio.charset.Charset; + + public class conftest { +@@ -11569,7 +11570,7 @@ + + + cat << \EOF > conftest.java +-// #line 11572 "configure" ++// #line 11573 "configure" + import java.lang.StringBuilder; + + public class conftest { +@@ -11743,6 +11744,9 @@ + # Sun + machine=sparc + ;; ++ powerpc|ppc64) ++ machine=ppc ++ ;; + esac + + # Check for known JDK installation layouts +@@ -11769,6 +11773,19 @@ + ac_java_jvm_jni_lib_runtime_path=$D + ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify" + D=$ac_java_jvm_dir/jre/lib/$machine/client ++ if test ! -f $D/libjvm.so; then # Check if it is in the client or server directory ++ # Try the server directory ++ D=$ac_java_jvm_dir/jre/lib/$machine/server ++ if test ! -f $D/libjvm.so; then ++ { { $as_echo "$as_me:$LINENO: error: Could not find libjvm.so in ++ jre/lib/$machine/client/ or in jre/lib/$machine/server/. ++ Please report to http://bugzilla.scilab.org/" >&5 ++$as_echo "$as_me: error: Could not find libjvm.so in ++ jre/lib/$machine/client/ or in jre/lib/$machine/server/. ++ Please report to http://bugzilla.scilab.org/" >&2;} ++ { (exit 1); exit 1; }; } ++ fi ++ fi + ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D" + ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D -ljvm" + D=$ac_java_jvm_dir/jre/lib/$machine/native_threads +@@ -12861,7 +12878,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 12864 "configure" ++// #line 12881 "configure" + import org.flexdock.docking.DockingManager; + + public class conftest { +@@ -12934,7 +12951,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 12937 "configure" ++// #line 12954 "configure" + import com.jgoodies.looks.common.RenderingUtils; + + public class conftest { +@@ -13007,7 +13024,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13010 "configure" ++// #line 13027 "configure" + import com.jgoodies.looks.common.RenderingUtils; + + public class conftest { +@@ -13083,7 +13100,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13086 "configure" ++// #line 13103 "configure" + import com.l2fprod.util.AccessUtils; + + public class conftest { +@@ -13156,7 +13173,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13159 "configure" ++// #line 13176 "configure" + import javax.media.opengl.glu.GLUnurbs; + + public class conftest { +@@ -13229,7 +13246,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13232 "configure" ++// #line 13249 "configure" + import javax.help.JHelp; + + public class conftest { +@@ -13302,7 +13319,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13305 "configure" ++// #line 13322 "configure" + import javax.help.JHelp; + + public class conftest { +@@ -13376,7 +13393,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13379 "configure" ++// #line 13396 "configure" + import com.sun.gluegen.runtime.CPU; + + public class conftest { +@@ -13449,7 +13466,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13452 "configure" ++// #line 13469 "configure" + import com.artenum.rosetta.interfaces.core.ConsoleConfiguration; + + public class conftest { +@@ -13522,7 +13539,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13525 "configure" ++// #line 13542 "configure" + import com.artenum.rosetta.core.action.AbstractConsoleAction; + + public class conftest { +@@ -13595,7 +13612,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 13598 "configure" ++// #line 13615 "configure" + import org.apache.commons.logging.LogFactory; + + public class conftest { +@@ -25897,7 +25914,7 @@ + { $as_echo "$as_me:$LINENO: checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later" >&5 + $as_echo_n "checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later... " >&6; } + cat > conftest.$ac_ext <&6; } + + cat > conftest.$ac_ext < conftest.java +-// #line 27309 "configure" ++// #line 27326 "configure" + import org.apache.batik.parser.Parser; + + public class conftest { +@@ -27379,7 +27396,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 27382 "configure" ++// #line 27399 "configure" + import org.apache.batik.parser.Parser; + + public class conftest { +@@ -27454,7 +27471,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 27457 "configure" ++// #line 27474 "configure" + import com.icl.saxon.Loader; + + public class conftest { +@@ -27527,7 +27544,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 27530 "configure" ++// #line 27547 "configure" + import org.apache.fop.pdf.PDFInfo; + + public class conftest { +@@ -27600,7 +27617,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 27603 "configure" ++// #line 27620 "configure" + import net.sourceforge.jeuclid.LayoutContext; + + public class conftest { +@@ -27673,7 +27690,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 27676 "configure" ++// #line 27693 "configure" + import org.apache.commons.io.output.CountingOutputStream; + + public class conftest { +@@ -27746,7 +27763,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 27749 "configure" ++// #line 27766 "configure" + import org.apache.xmlgraphics.util.Service; + + public class conftest { +@@ -27819,7 +27836,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 27822 "configure" ++// #line 27839 "configure" + import org.w3c.dom.svg.SVGDocument; + + public class conftest { +@@ -27893,7 +27910,7 @@ + export ac_java_classpath="$jar_resolved:$ac_java_classpath" + + cat << \EOF > conftest.java +-// #line 27896 "configure" ++// #line 27913 "configure" + import org.apache.avalon.framework.configuration.ConfigurationException; + + public class conftest { +@@ -28539,7 +28556,7 @@ + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 28542 "configure"' > conftest.$ac_ext ++ echo '#line 28559 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -30409,11 +30426,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:30412: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:30429: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:30416: \$? = $ac_status" >&5 ++ echo "$as_me:30433: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -30699,11 +30716,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:30702: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:30719: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:30706: \$? = $ac_status" >&5 ++ echo "$as_me:30723: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -30803,11 +30820,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:30806: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:30823: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:30810: \$? = $ac_status" >&5 ++ echo "$as_me:30827: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -33288,7 +33305,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < conftest.$ac_ext <&5) ++ (eval echo "\"\$as_me:35837: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:35824: \$? = $ac_status" >&5 ++ echo "$as_me:35841: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -35921,11 +35938,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:35924: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:35941: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:35928: \$? = $ac_status" >&5 ++ echo "$as_me:35945: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -37519,11 +37536,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:37522: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:37539: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:37526: \$? = $ac_status" >&5 ++ echo "$as_me:37543: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -37623,11 +37640,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:37626: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:37643: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:37630: \$? = $ac_status" >&5 ++ echo "$as_me:37647: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -39855,11 +39872,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:39858: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:39875: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:39862: \$? = $ac_status" >&5 ++ echo "$as_me:39879: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -40145,11 +40162,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:40148: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:40165: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:40152: \$? = $ac_status" >&5 ++ echo "$as_me:40169: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -40249,11 +40266,11 @@ + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:40252: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:40269: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:40256: \$? = $ac_status" >&5 ++ echo "$as_me:40273: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -44811,7 +44828,16 @@ + + + case $ac_file$ac_mode in +- "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do ++ "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files ++# are listed without --file. Let's play safe and only enable the eval ++# if we detect the quoting. ++case $CONFIG_FILES in ++*\'*) eval set x "$CONFIG_FILES" ;; ++*) set x $CONFIG_FILES ;; ++esac ++shift ++for mf ++do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. +--- scilab-5.1.1.obsolete.0.483493411521525/m4/java.m4 2009-04-14 09:30:41.000000000 +0200 ++++ scilab-5.1.1/m4/java.m4 2009-04-21 11:33:46.000000000 +0200 +@@ -422,6 +422,9 @@ + # Sun + machine=sparc + ;; ++ powerpc|ppc64) ++ machine=ppc ++ ;; + esac + + # Check for known JDK installation layouts +@@ -442,6 +445,15 @@ + ac_java_jvm_jni_lib_runtime_path=$D + ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify" + D=$ac_java_jvm_dir/jre/lib/$machine/client ++ if test ! -f $D/libjvm.so; then # Check if it is in the client or server directory ++ # Try the server directory ++ D=$ac_java_jvm_dir/jre/lib/$machine/server ++ if test ! -f $D/libjvm.so; then ++ AC_MSG_ERROR([Could not find libjvm.so in ++ jre/lib/$machine/client/ or in jre/lib/$machine/server/. ++ Please report to http://bugzilla.scilab.org/]) ++ fi ++ fi + ac_java_jvm_jni_lib_runtime_path="${ac_java_jvm_jni_lib_runtime_path}:$D" + ac_java_jvm_jni_lib_flags="$ac_java_jvm_jni_lib_flags -L$D -ljvm" + D=$ac_java_jvm_dir/jre/lib/$machine/native_threads --- scilab-5.1.1.orig/debian/patches/typo.diff +++ scilab-5.1.1/debian/patches/typo.diff @@ -0,0 +1,129 @@ +commit 2d2fcbc288fbfc160c3610c9a462b130e7952940 +Author: Sylvestre Ledru +Date: Mon Apr 27 14:46:52 2009 +0200 + + Typo succesfully => successfully + +diff --git a/scilab/modules/scicos/src/c/scicos.c b/scilab/modules/scicos/src/c/scicos.c +index 6929a1d..facc31d 100644 +--- a/scilab/modules/scicos/src/c/scicos.c ++++ b/scilab/modules/scicos/src/c/scicos.c +@@ -2218,7 +2218,7 @@ void cossimdaskr(told) + if ((C2F(cosdebug).cosd >= 1) && (C2F(cosdebug).cosd != 3)) + { + if (flagr>=0) { +- sciprint("**** SUNDIALS.IDA succesfully initialized *****/r/n" ); ++ sciprint("**** SUNDIALS.IDA succesffully initialized *****/r/n" ); + } + else{ + sciprint("**** SUNDIALS.IDA failed to initialize ->try again *****/r/n" ); +commit 2fb37dc8ded26c2d68eba7f6f86b3b99130b8e10 +Author: Sylvestre Ledru +Date: Mon Apr 27 14:30:54 2009 +0200 + + Typo: functionnality=>functionality + +diff --git a/scilab/modules/graphics/locales/ca_ES/graphics.po b/scilab/modules/graphics/locales/ca_ES/graphics.po +index 64df9f5..d1c3ecc 100644 +--- a/scilab/modules/graphics/locales/ca_ES/graphics.po ++++ b/scilab/modules/graphics/locales/ca_ES/graphics.po +@@ -606,7 +606,7 @@ msgstr "" + msgid "" + "%s: Using xgetmouse with a flag to avoid the event queue to be cleared is " + "obsolete.\n" +-"This functionnality will be permanently removed in Scilab 5.1.\n" ++"This functionality will be permanently removed in Scilab 5.1.\n" + msgstr "" + "%s: Ja no es pot utilitzar el xgetmouse amb una parca per evitar que es " + "netegi l'encuament.\n" +diff --git a/scilab/modules/graphics/locales/de_DE/graphics.po b/scilab/modules/graphics/locales/de_DE/graphics.po +index cb6ef83..efcac39 100644 +--- a/scilab/modules/graphics/locales/de_DE/graphics.po ++++ b/scilab/modules/graphics/locales/de_DE/graphics.po +@@ -577,7 +577,7 @@ msgstr "" + msgid "" + "%s: Using xgetmouse with a flag to avoid the event queue to be cleared is " + "obsolete.\n" +-"This functionnality will be permanently removed in Scilab 5.1.\n" ++"This functionality will be permanently removed in Scilab 5.1.\n" + msgstr "" + "%s: verwende xgetmouse mit einem Kennzeichen, um zu vermeiden, daß die " + "Ereignisschlange, dessen Inhalt gelöscht werden soll, überflüssig ist. Diese " +diff --git a/scilab/modules/graphics/locales/en_US/graphics.pot b/scilab/modules/graphics/locales/en_US/graphics.pot +index 99a795e..dc48456 100644 +--- a/scilab/modules/graphics/locales/en_US/graphics.pot ++++ b/scilab/modules/graphics/locales/en_US/graphics.pot +@@ -796,7 +796,7 @@ msgstr "" + msgid "" + "%s: Using xgetmouse with a flag to avoid the event queue to be cleared is " + "obsolete.\n" +-"This functionnality will be permanently removed in Scilab 5.1.\n" ++"This functionality will be permanently removed in Scilab 5.1.\n" + msgstr "" + # + # File: sci_gateway/c/sci_xlfont.c, line: 124 +diff --git a/scilab/modules/graphics/locales/es_ES/graphics.po b/scilab/modules/graphics/locales/es_ES/graphics.po +index e970b2c..342e112 100644 +--- a/scilab/modules/graphics/locales/es_ES/graphics.po ++++ b/scilab/modules/graphics/locales/es_ES/graphics.po +@@ -598,7 +598,7 @@ msgstr "" + msgid "" + "%s: Using xgetmouse with a flag to avoid the event queue to be cleared is " + "obsolete.\n" +-"This functionnality will be permanently removed in Scilab 5.1.\n" ++"This functionality will be permanently removed in Scilab 5.1.\n" + msgstr "" + "%s: Usando xgetmouse con una bandera para evitar que la cola de eventos sea " + "limpiada es obsoleto.\n" +diff --git a/scilab/modules/graphics/locales/fr_FR/graphics.po b/scilab/modules/graphics/locales/fr_FR/graphics.po +index 8539775..b71a27b 100644 +--- a/scilab/modules/graphics/locales/fr_FR/graphics.po ++++ b/scilab/modules/graphics/locales/fr_FR/graphics.po +@@ -593,7 +593,7 @@ msgstr "" + msgid "" + "%s: Using xgetmouse with a flag to avoid the event queue to be cleared is " + "obsolete.\n" +-"This functionnality will be permanently removed in Scilab 5.1.\n" ++"This functionality will be permanently removed in Scilab 5.1.\n" + msgstr "" + "%s : L'utilisation de xgetmouse avec un paramètre permettant d'éviter que la " + "queue d'évènements soit effacée, est obsolète.\n" +diff --git a/scilab/modules/graphics/locales/ru_RU/graphics.po b/scilab/modules/graphics/locales/ru_RU/graphics.po +index d990c11..d04b110 100644 +--- a/scilab/modules/graphics/locales/ru_RU/graphics.po ++++ b/scilab/modules/graphics/locales/ru_RU/graphics.po +@@ -572,7 +572,7 @@ msgstr "" + msgid "" + "%s: Using xgetmouse with a flag to avoid the event queue to be cleared is " + "obsolete.\n" +-"This functionnality will be permanently removed in Scilab 5.1.\n" ++"This functionality will be permanently removed in Scilab 5.1.\n" + msgstr "" + "%s: Использование xgetmouse с флагом для того, чтобы избежать очистку " + "очереди событий, устарело.\n" +diff --git a/scilab/modules/graphics/locales/zh_CN/graphics.po b/scilab/modules/graphics/locales/zh_CN/graphics.po +index 4b7cb37..b496d07 100644 +--- a/scilab/modules/graphics/locales/zh_CN/graphics.po ++++ b/scilab/modules/graphics/locales/zh_CN/graphics.po +@@ -500,7 +500,7 @@ msgstr "%s:输入参数#%d的类型错误:应该为布尔向量。\n" + msgid "" + "%s: Using xgetmouse with a flag to avoid the event queue to be cleared is " + "obsolete.\n" +-"This functionnality will be permanently removed in Scilab 5.1.\n" ++"This functionality will be permanently removed in Scilab 5.1.\n" + msgstr "" + + #, c-format +diff --git a/scilab/modules/graphics/sci_gateway/c/sci_xgetmouse.c b/scilab/modules/graphics/sci_gateway/c/sci_xgetmouse.c +index 1804abc..9d55cfe 100644 +--- a/scilab/modules/graphics/sci_gateway/c/sci_xgetmouse.c ++++ b/scilab/modules/graphics/sci_gateway/c/sci_xgetmouse.c +@@ -99,7 +99,7 @@ int sci_xgetmouse( char *fname,unsigned long fname_len ) + // Display a warning if a flag has been given (obsolete use) + if (displayWarning) + { +- sciprint(_("%s: Using xgetmouse with a flag to avoid the event queue to be cleared is obsolete.\nThis functionnality will be permanently removed in Scilab 5.1.\n"),fname); ++ sciprint(_("%s: Using xgetmouse with a flag to avoid the event queue to be cleared is obsolete.\nThis functionality will be permanently removed in Scilab 5.1.\n"),fname); + } + + // Call Java to get mouse information --- scilab-5.1.1.orig/debian/patches/addchapter.diff +++ scilab-5.1.1/debian/patches/addchapter.diff @@ -0,0 +1,16 @@ +diff -Nur scilab-5.1.1.orig/modules/helptools/macros/add_module_help_chapter.sci scilab-5.1.1/modules/helptools/macros/add_module_help_chapter.sci +--- scilab-5.1.1.orig/modules/helptools/macros/add_module_help_chapter.sci 2009-04-14 09:30:56.000000000 +0200 ++++ scilab-5.1.1/modules/helptools/macros/add_module_help_chapter.sci 2009-04-14 18:07:23.000000000 +0200 +@@ -19,10 +19,8 @@ + path_addchapter = SCI+"/modules/"+modulename+"/help/"+getdefaultlanguage()+"/addchapter.sce"; + end + +- //try ++ if ( fileinfo(path_addchapter) <> [] ) then + exec(path_addchapter); +- //catch +- // warning(gettext("Incorrect module path ")+path_addchapter); +- //end ++ end + + endfunction \ No newline at end of file --- scilab-5.1.1.orig/debian/patches/missingaddchapter.diff +++ scilab-5.1.1/debian/patches/missingaddchapter.diff @@ -0,0 +1,25 @@ +commit aad7b644ccc97638598c2831d550edb51bdb13f1 +Author: Sylvestre Ledru +Date: Mon Apr 27 15:16:20 2009 +0200 + + Missing addchapter.sce + +diff --git a/scilab/modules/call_scilab/help/en_US/addchapter.sce b/scilab/modules/call_scilab/help/en_US/addchapter.sce +new file mode 100644 +index 0000000..29d4a54 +--- /dev/null ++++ b/scilab/modules/call_scilab/help/en_US/addchapter.sce +@@ -0,0 +1,13 @@ ++// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab ++// Copyright (C) 2007-2008 - INRIA - Allan CORNET ++// Copyright (C) 2009 - DIGITEO ++// ++// This file must be used under the terms of the CeCILL. ++// This source file is licensed as described in the file COPYING, which ++// you should have received as part of this distribution. The terms ++// are also available at ++// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt ++ ++path = SCI+"/modules/call_scilab/help/en_US"; ++add_help_chapter("call_scilab API",path,%T); ++clear path add_help_chapter; --- scilab-5.1.1.orig/debian/patches/malloc.diff +++ scilab-5.1.1/debian/patches/malloc.diff @@ -0,0 +1,96 @@ +diff -u scilab-5.0.3.orig/libs/MALLOC/Makefile.am scilab-5.0.3/libs/MALLOC/Makefile.am +--- scilab-5.0.3.orig/libs/MALLOC/Makefile.am 2008-11-05 18:42:13.000000000 +0100 ++++ scilab-5.0.3/libs/MALLOC/Makefile.am 2008-11-19 22:51:28.000000000 +0100 +@@ -6,7 +6,7 @@ + MALLOC_C_SOURCES = src/sci_mem_alloc.c src/getmaxMALLOC.c + + if IS_64_BITS_CPU +-MALLOC_C_SOURCES += src/malloc.c ++#MALLOC_C_SOURCES += src/malloc.c + endif + + libscimalloc_la_includedir=$(pkgincludedir)/malloc +Only in scilab-5.0.3/libs/MALLOC/: Makefile.am~ +diff -u scilab-5.0.3.orig/libs/MALLOC/Makefile.in scilab-5.0.3/libs/MALLOC/Makefile.in +--- scilab-5.0.3.orig/libs/MALLOC/Makefile.in 2008-11-05 18:42:13.000000000 +0100 ++++ scilab-5.0.3/libs/MALLOC/Makefile.in 2008-11-19 22:51:37.000000000 +0100 +@@ -54,10 +54,9 @@ + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-@IS_64_BITS_CPU_TRUE@am__append_1 = src/malloc.c + DIST_COMMON = $(libscimalloc_la_include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/Makefile.incl.am +-@NEED_JAVA_TRUE@am__append_2 = java ++@NEED_JAVA_TRUE@am__append_1 = java + subdir = libs/MALLOC + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \ +@@ -88,12 +87,9 @@ + pkglibLTLIBRARIES_INSTALL = $(INSTALL) + LTLIBRARIES = $(pkglib_LTLIBRARIES) + libscimalloc_la_DEPENDENCIES = +-am__libscimalloc_la_SOURCES_DIST = src/sci_mem_alloc.c \ +- src/getmaxMALLOC.c src/malloc.c +-@IS_64_BITS_CPU_TRUE@am__objects_1 = libscimalloc_la-malloc.lo +-am__objects_2 = libscimalloc_la-sci_mem_alloc.lo \ +- libscimalloc_la-getmaxMALLOC.lo $(am__objects_1) +-am_libscimalloc_la_OBJECTS = $(am__objects_2) ++am__objects_1 = libscimalloc_la-sci_mem_alloc.lo \ ++ libscimalloc_la-getmaxMALLOC.lo ++am_libscimalloc_la_OBJECTS = $(am__objects_1) + libscimalloc_la_OBJECTS = $(am_libscimalloc_la_OBJECTS) + libscimalloc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libscimalloc_la_CFLAGS) \ +@@ -111,7 +107,7 @@ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ + SOURCES = $(libscimalloc_la_SOURCES) +-DIST_SOURCES = $(am__libscimalloc_la_SOURCES_DIST) ++DIST_SOURCES = $(libscimalloc_la_SOURCES) + libscimalloc_la_includeHEADERS_INSTALL = $(INSTALL_HEADER) + HEADERS = $(libscimalloc_la_include_HEADERS) + ETAGS = etags +@@ -308,8 +304,9 @@ + target_alias = @target_alias@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-MALLOC_C_SOURCES = src/sci_mem_alloc.c src/getmaxMALLOC.c \ +- $(am__append_1) ++MALLOC_C_SOURCES = src/sci_mem_alloc.c src/getmaxMALLOC.c ++ ++#MALLOC_C_SOURCES += src/malloc.c + libscimalloc_la_includedir = $(pkgincludedir)/malloc + libscimalloc_la_include_HEADERS = includes/sci_mem_alloc.h \ + includes/MALLOC.h \ +@@ -333,7 +330,7 @@ + #### the procedure will be the same with Microsoft Windows (C) + #### and Linux/Unix + ####################################################################### +-TARGETS_ALL = $(am__append_2) ++TARGETS_ALL = $(am__append_1) + + ################ MACROS ###################### + # Rule to build a macro +@@ -444,7 +441,6 @@ + -rm -f *.tab.c + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscimalloc_la-getmaxMALLOC.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscimalloc_la-malloc.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscimalloc_la-sci_mem_alloc.Plo@am__quote@ + + .c.o: +@@ -482,13 +478,6 @@ + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscimalloc_la_CFLAGS) $(CFLAGS) -c -o libscimalloc_la-getmaxMALLOC.lo `test -f 'src/getmaxMALLOC.c' || echo '$(srcdir)/'`src/getmaxMALLOC.c + +-libscimalloc_la-malloc.lo: src/malloc.c +-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscimalloc_la_CFLAGS) $(CFLAGS) -MT libscimalloc_la-malloc.lo -MD -MP -MF $(DEPDIR)/libscimalloc_la-malloc.Tpo -c -o libscimalloc_la-malloc.lo `test -f 'src/malloc.c' || echo '$(srcdir)/'`src/malloc.c +-@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/libscimalloc_la-malloc.Tpo $(DEPDIR)/libscimalloc_la-malloc.Plo +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/malloc.c' object='libscimalloc_la-malloc.lo' libtool=yes @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libscimalloc_la_CFLAGS) $(CFLAGS) -c -o libscimalloc_la-malloc.lo `test -f 'src/malloc.c' || echo '$(srcdir)/'`src/malloc.c +- + mostlyclean-libtool: + -rm -f *.lo + --- scilab-5.1.1.orig/debian/patches/exitincode.diff +++ scilab-5.1.1/debian/patches/exitincode.diff @@ -0,0 +1,8528 @@ +commit ada3c2971060f5b9e9b663e1d1ce47be56df2302 +Author: Sylvestre Ledru +Date: Mon Apr 27 14:21:20 2009 +0200 + + Generation of the C++ => Java code with GIWS 1.0.2 + +diff --git a/scilab/CHANGES_5.1.X b/scilab/CHANGES_5.1.X +index 7426809..633b0cc 100644 +--- a/scilab/CHANGES_5.1.X ++++ b/scilab/CHANGES_5.1.X +@@ -9,6 +9,9 @@ Compilation: + -Xcheck:jni) in order to provide more feedbacks on debug + Note that this should be used into a binary since it is expensive + ++* C++ => Java connector updated (using GIWS - ++ http://www.scilab.org/giws/ version 1.0.2) ++ + Source reorganisation: + ====================== + +diff --git a/scilab/modules/console/src/jni/CallScilabBridge.cpp b/scilab/modules/console/src/jni/CallScilabBridge.cpp +index 426f482..b972a1e 100644 +--- a/scilab/modules/console/src/jni/CallScilabBridge.cpp ++++ b/scilab/modules/console/src/jni/CallScilabBridge.cpp +@@ -1,5 +1,5 @@ + #include "CallScilabBridge.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -145,22 +145,17 @@ jbooleanisWaitingForInputID=NULL; + + // Generic methods + +- + void CallScilabBridge::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "CallScilabBridge"); + } + } + +- + void CallScilabBridge::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "CallScilabBridge"); + } + } +- + // Method(s) + + void CallScilabBridge::display (JavaVM * jvm_, char * dataToDisplay){ +diff --git a/scilab/modules/console/src/jni/CallScilabBridge.hxx b/scilab/modules/console/src/jni/CallScilabBridge.hxx +index 018c09e..060ccfb 100644 +--- a/scilab/modules/console/src/jni/CallScilabBridge.hxx ++++ b/scilab/modules/console/src/jni/CallScilabBridge.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/console/src/jni/GiwsException.cpp b/scilab/modules/console/src/jni/GiwsException.cpp +index fc4d53c..234e52b 100644 +--- a/scilab/modules/console/src/jni/GiwsException.cpp ++++ b/scilab/modules/console/src/jni/GiwsException.cpp +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -47,7 +47,7 @@ namespace GiwsException { + */ + JniException::JniException(JNIEnv * curEnv) throw() : exception() + { +-// retrieve informations about the exception ++// retrieve information about the exception + javaException = curEnv->ExceptionOccurred(); + /* Clear the Java Exception to avoid calling it again & again */ + curEnv->ExceptionClear(); +@@ -122,7 +122,7 @@ std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv) + { + // return the result of the getLocalizedMessage method + +-// retrieve informations from the exception. ++// retrieve information from the exception. + // get method id + jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), + "getLocalizedMessage", +@@ -153,7 +153,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + // return the result of the getStackTrace method + +- // retrieve informations from the exception. ++ // retrieve information from the exception. + // get method id + // getStackTrace returns an array of StackTraceElement + jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), +@@ -242,9 +242,9 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + } + + /** +- * To be called when all the informations about the exceptions have been ++ * To be called when all the information about the exceptions have been + * retrived. +- * Remove the exception from the environement. ++ * Remove the exception from the environment. + */ + void JniException::closeException(JNIEnv * curEnv) + { +@@ -293,7 +293,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + */ + + /** +- * @pram curEnv java environment where the exception occured. ++ * @param curEnv java environment where the exception occured. + */ + JniCallMethodException::JniCallMethodException(JNIEnv * curEnv) throw() : JniException(curEnv) + { +@@ -305,7 +305,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + JniCallMethodException::~JniCallMethodException(void) throw() {} + /** +- * @pram className name of the class which haven't been found ++ * @param className name of the class which haven't been found + */ + JniClassNotFoundException::JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -316,7 +316,7 @@ setErrorMessage(errorMessage); + JniClassNotFoundException::~JniClassNotFoundException(void) throw() {} + + /** +- * @pram className name of the method which haven't been found ++ * @param className name of the method which haven't been found + */ + JniMethodNotFoundException::JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw() : JniException(curEnv) + { +@@ -325,8 +325,9 @@ setErrorMessage(errorMessage); + } + + JniMethodNotFoundException::~JniMethodNotFoundException(void) throw() {} ++ + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException::JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -336,6 +337,17 @@ setErrorMessage(errorMessage); + + JniObjectCreationException::~JniObjectCreationException(void) throw() {} + ++ /** ++ * @param curEnv java envirnonment where the exception occured. ++ */ ++ JniMonitorException::JniMonitorException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) ++ { ++std::string errorMessage = "Error in the access (Enter or exit) or a Java env monitor of class " + className + "."; ++setErrorMessage(errorMessage); ++ } ++ ++ JniMonitorException::~JniMonitorException(void) throw() {} ++ + + + } +diff --git a/scilab/modules/console/src/jni/GiwsException.hxx b/scilab/modules/console/src/jni/GiwsException.hxx +index a2be211..73f8175 100644 +--- a/scilab/modules/console/src/jni/GiwsException.hxx ++++ b/scilab/modules/console/src/jni/GiwsException.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -129,9 +129,9 @@ std::string retrieveStackTrace(JNIEnv * curEnv); + */ + std::string retrieveExceptionName(JNIEnv * curEnv); + /** +-* To be called when all the informations about the exceptions have been ++* To be called when all the information about the exceptions have been + * retrived. +-* Remove the exception from the environement. ++* Remove the exception from the environment. + */ + void closeException(JNIEnv * curEnv); + +@@ -164,7 +164,7 @@ class JniCallMethodException : public JniException + public: + + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniCallMethodException(JNIEnv * curEnv) throw(); + +@@ -179,7 +179,7 @@ class JniClassNotFoundException : public JniException + public: + + /** +-* @pram className name of the class which haven't been found ++* @param className name of the class which haven't been found + */ + JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw(); + +@@ -195,7 +195,7 @@ class JniMethodNotFoundException : public JniException + public: + + /** +-* @pram className name of the method which haven't been found ++* @param className name of the method which haven't been found + */ + JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw(); + virtual ~JniMethodNotFoundException(void) throw(); +@@ -213,7 +213,7 @@ class JniObjectCreationException : public JniException + public: + + /** +-* @pram curEnv java envirnonment where the exception occured. ++* @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw(); + virtual ~JniObjectCreationException(void) throw(); +@@ -221,6 +221,23 @@ virtual ~JniObjectCreationException(void) throw(); + }; + + ++/** ++* Exception that should be thrown when a call to the Java monitor ++* failed ++*/ ++class JniMonitorException : public JniException ++{ ++public: ++ ++/** ++* @param curEnv java envirnonment where the exception occured. ++*/ ++JniMonitorException(JNIEnv * curEnv, const std::string & className) throw(); ++virtual ~JniMonitorException(void) throw(); ++ ++}; ++ ++ + } + #endif + +diff --git a/scilab/modules/graphic_export/src/jni/FileExporter.cpp b/scilab/modules/graphic_export/src/jni/FileExporter.cpp +index 52953ac..ef846f3 100644 +--- a/scilab/modules/graphic_export/src/jni/FileExporter.cpp ++++ b/scilab/modules/graphic_export/src/jni/FileExporter.cpp +@@ -1,5 +1,5 @@ + #include "FileExporter.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -129,22 +129,17 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className()); + + // Generic methods + +- + void FileExporter::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FileExporter"); + } + } + +- + void FileExporter::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FileExporter"); + } + } +- + // Method(s) + + int FileExporter::fileExport (JavaVM * jvm_, int figureIndex, char * fileName, int fileType, int orientation){ +diff --git a/scilab/modules/graphic_export/src/jni/FileExporter.hxx b/scilab/modules/graphic_export/src/jni/FileExporter.hxx +index b0a919f..da4b690 100644 +--- a/scilab/modules/graphic_export/src/jni/FileExporter.hxx ++++ b/scilab/modules/graphic_export/src/jni/FileExporter.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/graphic_export/src/jni/GL2PSToJOGL.cpp b/scilab/modules/graphic_export/src/jni/GL2PSToJOGL.cpp +index c376468..0057fe6 100644 +--- a/scilab/modules/graphic_export/src/jni/GL2PSToJOGL.cpp ++++ b/scilab/modules/graphic_export/src/jni/GL2PSToJOGL.cpp +@@ -1,5 +1,5 @@ + #include "GL2PSToJOGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -167,22 +167,17 @@ voidglPassThroughjfloatID=NULL; + + // Generic methods + +- + void GL2PSToJOGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "GL2PSToJOGL"); + } + } + +- + void GL2PSToJOGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "GL2PSToJOGL"); + } + } +- + // Method(s) + + void GL2PSToJOGL::glFeedbackBuffer (JavaVM * jvm_, int arg0, int arg1){ +diff --git a/scilab/modules/graphic_export/src/jni/GL2PSToJOGL.hxx b/scilab/modules/graphic_export/src/jni/GL2PSToJOGL.hxx +index c9bf10b..fad0780 100644 +--- a/scilab/modules/graphic_export/src/jni/GL2PSToJOGL.hxx ++++ b/scilab/modules/graphic_export/src/jni/GL2PSToJOGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/graphic_export/src/jni/GiwsException.cpp b/scilab/modules/graphic_export/src/jni/GiwsException.cpp +index fc4d53c..234e52b 100644 +--- a/scilab/modules/graphic_export/src/jni/GiwsException.cpp ++++ b/scilab/modules/graphic_export/src/jni/GiwsException.cpp +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -47,7 +47,7 @@ namespace GiwsException { + */ + JniException::JniException(JNIEnv * curEnv) throw() : exception() + { +-// retrieve informations about the exception ++// retrieve information about the exception + javaException = curEnv->ExceptionOccurred(); + /* Clear the Java Exception to avoid calling it again & again */ + curEnv->ExceptionClear(); +@@ -122,7 +122,7 @@ std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv) + { + // return the result of the getLocalizedMessage method + +-// retrieve informations from the exception. ++// retrieve information from the exception. + // get method id + jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), + "getLocalizedMessage", +@@ -153,7 +153,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + // return the result of the getStackTrace method + +- // retrieve informations from the exception. ++ // retrieve information from the exception. + // get method id + // getStackTrace returns an array of StackTraceElement + jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), +@@ -242,9 +242,9 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + } + + /** +- * To be called when all the informations about the exceptions have been ++ * To be called when all the information about the exceptions have been + * retrived. +- * Remove the exception from the environement. ++ * Remove the exception from the environment. + */ + void JniException::closeException(JNIEnv * curEnv) + { +@@ -293,7 +293,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + */ + + /** +- * @pram curEnv java environment where the exception occured. ++ * @param curEnv java environment where the exception occured. + */ + JniCallMethodException::JniCallMethodException(JNIEnv * curEnv) throw() : JniException(curEnv) + { +@@ -305,7 +305,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + JniCallMethodException::~JniCallMethodException(void) throw() {} + /** +- * @pram className name of the class which haven't been found ++ * @param className name of the class which haven't been found + */ + JniClassNotFoundException::JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -316,7 +316,7 @@ setErrorMessage(errorMessage); + JniClassNotFoundException::~JniClassNotFoundException(void) throw() {} + + /** +- * @pram className name of the method which haven't been found ++ * @param className name of the method which haven't been found + */ + JniMethodNotFoundException::JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw() : JniException(curEnv) + { +@@ -325,8 +325,9 @@ setErrorMessage(errorMessage); + } + + JniMethodNotFoundException::~JniMethodNotFoundException(void) throw() {} ++ + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException::JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -336,6 +337,17 @@ setErrorMessage(errorMessage); + + JniObjectCreationException::~JniObjectCreationException(void) throw() {} + ++ /** ++ * @param curEnv java envirnonment where the exception occured. ++ */ ++ JniMonitorException::JniMonitorException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) ++ { ++std::string errorMessage = "Error in the access (Enter or exit) or a Java env monitor of class " + className + "."; ++setErrorMessage(errorMessage); ++ } ++ ++ JniMonitorException::~JniMonitorException(void) throw() {} ++ + + + } +diff --git a/scilab/modules/graphic_export/src/jni/GiwsException.hxx b/scilab/modules/graphic_export/src/jni/GiwsException.hxx +index a2be211..73f8175 100644 +--- a/scilab/modules/graphic_export/src/jni/GiwsException.hxx ++++ b/scilab/modules/graphic_export/src/jni/GiwsException.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -129,9 +129,9 @@ std::string retrieveStackTrace(JNIEnv * curEnv); + */ + std::string retrieveExceptionName(JNIEnv * curEnv); + /** +-* To be called when all the informations about the exceptions have been ++* To be called when all the information about the exceptions have been + * retrived. +-* Remove the exception from the environement. ++* Remove the exception from the environment. + */ + void closeException(JNIEnv * curEnv); + +@@ -164,7 +164,7 @@ class JniCallMethodException : public JniException + public: + + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniCallMethodException(JNIEnv * curEnv) throw(); + +@@ -179,7 +179,7 @@ class JniClassNotFoundException : public JniException + public: + + /** +-* @pram className name of the class which haven't been found ++* @param className name of the class which haven't been found + */ + JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw(); + +@@ -195,7 +195,7 @@ class JniMethodNotFoundException : public JniException + public: + + /** +-* @pram className name of the method which haven't been found ++* @param className name of the method which haven't been found + */ + JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw(); + virtual ~JniMethodNotFoundException(void) throw(); +@@ -213,7 +213,7 @@ class JniObjectCreationException : public JniException + public: + + /** +-* @pram curEnv java envirnonment where the exception occured. ++* @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw(); + virtual ~JniObjectCreationException(void) throw(); +@@ -221,6 +221,23 @@ virtual ~JniObjectCreationException(void) throw(); + }; + + ++/** ++* Exception that should be thrown when a call to the Java monitor ++* failed ++*/ ++class JniMonitorException : public JniException ++{ ++public: ++ ++/** ++* @param curEnv java envirnonment where the exception occured. ++*/ ++JniMonitorException(JNIEnv * curEnv, const std::string & className) throw(); ++virtual ~JniMonitorException(void) throw(); ++ ++}; ++ ++ + } + #endif + +diff --git a/scilab/modules/graphic_export/src/jni/JOGLConstant.cpp b/scilab/modules/graphic_export/src/jni/JOGLConstant.cpp +index ca38add..7dc8a85 100644 +--- a/scilab/modules/graphic_export/src/jni/JOGLConstant.cpp ++++ b/scilab/modules/graphic_export/src/jni/JOGLConstant.cpp +@@ -1,5 +1,5 @@ + #include "JOGLConstant.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -193,22 +193,17 @@ jintget_GL_LINE_STIPPLE_REPEATID=NULL; + + // Generic methods + +- + void JOGLConstant::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "JOGLConstant"); + } + } + +- + void JOGLConstant::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "JOGLConstant"); + } + } +- + // Method(s) + + int JOGLConstant::get_GL_RGBA (JavaVM * jvm_){ +diff --git a/scilab/modules/graphic_export/src/jni/JOGLConstant.hxx b/scilab/modules/graphic_export/src/jni/JOGLConstant.hxx +index e8e62a6..10a02cf 100644 +--- a/scilab/modules/graphic_export/src/jni/JOGLConstant.hxx ++++ b/scilab/modules/graphic_export/src/jni/JOGLConstant.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/gui/src/jni/CallScilabBridge.cpp b/scilab/modules/gui/src/jni/CallScilabBridge.cpp +index 936a19c..f1a1acc 100644 +--- a/scilab/modules/gui/src/jni/CallScilabBridge.cpp ++++ b/scilab/modules/gui/src/jni/CallScilabBridge.cpp +@@ -1,5 +1,5 @@ + #include "CallScilabBridge.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -68,9 +68,7 @@ JNIEnv * curEnv = getCurrentEnv(); + + localClass = curEnv->FindClass( this->className().c_str() ) ; + if (localClass == NULL) { +-std::cerr << "Could not get the Class " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++ throw GiwsException::JniClassNotFoundException(curEnv, this->className()); + } + + this->instanceClass = (jclass) curEnv->NewGlobalRef(localClass) ; +@@ -79,31 +77,23 @@ this->instanceClass = (jclass) curEnv->NewGlobalRef(localClass) ; + curEnv->DeleteLocalRef(localClass); + + if (this->instanceClass == NULL) { +-std::cerr << "Could not create a Global Ref of " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + + constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ; + if(constructObject == NULL){ +-std::cerr << "Could not retrieve the constructor of the class " << this->className() << " with the profile : " << construct << param << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ; + if(localInstance == NULL){ +-std::cerr << "Could not instantiate the object " << this->className() << " with the constructor : " << construct << param << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + this->instance = curEnv->NewGlobalRef(localInstance) ; + if(this->instance == NULL){ +-std::cerr << "Could not create a new global ref of " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + /* localInstance not needed anymore */ + curEnv->DeleteLocalRef(localInstance); +@@ -301,18 +291,12 @@ jclass localClass = curEnv->GetObjectClass(JObj); + curEnv->DeleteLocalRef(localClass); + + if (this->instanceClass == NULL) { +- +-std::cerr << "Could not create a Global Ref of " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + this->instance = curEnv->NewGlobalRef(JObj) ; + if(this->instance == NULL){ +- +-std::cerr << "Could not create a new global ref of " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + /* Methods ID set to NULL */ + jintnewWindowID=NULL; +@@ -499,22 +483,17 @@ jbooleanuseCanvasForDisplayID=NULL; + + // Generic methods + +- + void CallScilabBridge::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "CallScilabBridge"); + } + } + +- + void CallScilabBridge::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "CallScilabBridge"); + } + } +- + // Method(s) + + int CallScilabBridge::newWindow (JavaVM * jvm_){ +@@ -525,17 +504,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewWindowID = curEnv->GetStaticMethodID(cls, "newWindow", "()I" ) ; + if (jintnewWindowID == NULL) { +-std::cerr << "Could not access to the method " << "newWindow" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newWindow"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewWindowID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -548,17 +523,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewMenuBarID = curEnv->GetStaticMethodID(cls, "newMenuBar", "()I" ) ; + if (jintnewMenuBarID == NULL) { +-std::cerr << "Could not access to the method " << "newMenuBar" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newMenuBar"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewMenuBarID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -571,17 +542,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewMenuID = curEnv->GetStaticMethodID(cls, "newMenu", "()I" ) ; + if (jintnewMenuID == NULL) { +-std::cerr << "Could not access to the method " << "newMenu" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newMenu"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewMenuID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -594,17 +561,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewPushButtonID = curEnv->GetStaticMethodID(cls, "newPushButton", "()I" ) ; + if (jintnewPushButtonID == NULL) { +-std::cerr << "Could not access to the method " << "newPushButton" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newPushButton"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewPushButtonID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -617,17 +580,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewEditBoxID = curEnv->GetStaticMethodID(cls, "newEditBox", "()I" ) ; + if (jintnewEditBoxID == NULL) { +-std::cerr << "Could not access to the method " << "newEditBox" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newEditBox"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewEditBoxID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -640,17 +599,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewLabelID = curEnv->GetStaticMethodID(cls, "newLabel", "()I" ) ; + if (jintnewLabelID == NULL) { +-std::cerr << "Could not access to the method " << "newLabel" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newLabel"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewLabelID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -663,17 +618,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewCheckBoxID = curEnv->GetStaticMethodID(cls, "newCheckBox", "()I" ) ; + if (jintnewCheckBoxID == NULL) { +-std::cerr << "Could not access to the method " << "newCheckBox" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newCheckBox"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewCheckBoxID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -686,17 +637,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewRadioButtonID = curEnv->GetStaticMethodID(cls, "newRadioButton", "()I" ) ; + if (jintnewRadioButtonID == NULL) { +-std::cerr << "Could not access to the method " << "newRadioButton" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newRadioButton"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewRadioButtonID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -709,17 +656,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewSliderID = curEnv->GetStaticMethodID(cls, "newSlider", "()I" ) ; + if (jintnewSliderID == NULL) { +-std::cerr << "Could not access to the method " << "newSlider" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newSlider"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewSliderID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -732,17 +675,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewPopupMenuID = curEnv->GetStaticMethodID(cls, "newPopupMenu", "()I" ) ; + if (jintnewPopupMenuID == NULL) { +-std::cerr << "Could not access to the method " << "newPopupMenu" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newPopupMenu"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewPopupMenuID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -755,17 +694,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewListBoxID = curEnv->GetStaticMethodID(cls, "newListBox", "()I" ) ; + if (jintnewListBoxID == NULL) { +-std::cerr << "Could not access to the method " << "newListBox" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newListBox"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewListBoxID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -778,17 +713,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewFrameID = curEnv->GetStaticMethodID(cls, "newFrame", "()I" ) ; + if (jintnewFrameID == NULL) { +-std::cerr << "Could not access to the method " << "newFrame" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newFrame"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewFrameID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -801,9 +732,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringnewContextMenujobjectArrayID = curEnv->GetStaticMethodID(cls, "newContextMenu", "([Ljava/lang/String;)Ljava/lang/String;" ) ; + if (jstringnewContextMenujobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "newContextMenu" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newContextMenu"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -811,8 +740,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray menuLabels_ = curEnv->NewObjectArray( menuLabelsSize, stringArrayClass, NULL); + if (menuLabels_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -821,8 +749,7 @@ for ( int i = 0; i < menuLabelsSize; i++) + jstring TempString = curEnv->NewStringUTF( menuLabels[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( menuLabels_, i, TempString); +@@ -831,12 +758,10 @@ curEnv->SetObjectArrayElement( menuLabels_, i, TempString); + curEnv->DeleteLocalRef(TempString); + } + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringnewContextMenujobjectArrayID ,menuLabels_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); +@@ -844,11 +769,9 @@ curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(menuLabels_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -861,17 +784,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewContextMenuID = curEnv->GetStaticMethodID(cls, "newContextMenu", "()I" ) ; + if (jintnewContextMenuID == NULL) { +-std::cerr << "Could not access to the method " << "newContextMenu" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newContextMenu"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewContextMenuID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -884,17 +803,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiddestroyWidgetjintID = curEnv->GetStaticMethodID(cls, "destroyWidget", "(I)V" ) ; + if (voiddestroyWidgetjintID == NULL) { +-std::cerr << "Could not access to the method " << "destroyWidget" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "destroyWidget"); + } + + curEnv->CallStaticVoidMethod(cls, voiddestroyWidgetjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::destroyFrame (JavaVM * jvm_, int objID){ +@@ -905,17 +820,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiddestroyFramejintID = curEnv->GetStaticMethodID(cls, "destroyFrame", "(I)V" ) ; + if (voiddestroyFramejintID == NULL) { +-std::cerr << "Could not access to the method " << "destroyFrame" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "destroyFrame"); + } + + curEnv->CallStaticVoidMethod(cls, voiddestroyFramejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::newWindow (JavaVM * jvm_, int figureIndex){ +@@ -926,17 +837,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewWindowjintID = curEnv->GetStaticMethodID(cls, "newWindow", "(I)I" ) ; + if (jintnewWindowjintID == NULL) { +-std::cerr << "Could not access to the method " << "newWindow" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newWindow"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewWindowjintID ,figureIndex); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -949,17 +856,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFigureAsParentjintjintID = curEnv->GetStaticMethodID(cls, "setFigureAsParent", "(II)V" ) ; + if (voidsetFigureAsParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setFigureAsParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFigureAsParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetFigureAsParentjintjintID ,figureID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setMenuAsParent (JavaVM * jvm_, int menuID, int objID){ +@@ -970,17 +873,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMenuAsParentjintjintID = curEnv->GetStaticMethodID(cls, "setMenuAsParent", "(II)V" ) ; + if (voidsetMenuAsParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setMenuAsParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMenuAsParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetMenuAsParentjintjintID ,menuID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setRootAsParent (JavaVM * jvm_, int objID){ +@@ -991,17 +890,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetRootAsParentjintID = curEnv->GetStaticMethodID(cls, "setRootAsParent", "(I)V" ) ; + if (voidsetRootAsParentjintID == NULL) { +-std::cerr << "Could not access to the method " << "setRootAsParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setRootAsParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetRootAsParentjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1012,17 +907,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetParentjintjintID = curEnv->GetStaticMethodID(cls, "setParent", "(II)V" ) ; + if (voidsetParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setPushButtonParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1033,17 +924,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetPushButtonParentjintjintID = curEnv->GetStaticMethodID(cls, "setPushButtonParent", "(II)V" ) ; + if (voidsetPushButtonParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setPushButtonParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setPushButtonParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetPushButtonParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removePushButtonFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1054,17 +941,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremovePushButtonFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removePushButtonFromParent", "(II)V" ) ; + if (voidremovePushButtonFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removePushButtonFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removePushButtonFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremovePushButtonFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setEditBoxParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1075,17 +958,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetEditBoxParentjintjintID = curEnv->GetStaticMethodID(cls, "setEditBoxParent", "(II)V" ) ; + if (voidsetEditBoxParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setEditBoxParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setEditBoxParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetEditBoxParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removeEditBoxFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1096,17 +975,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveEditBoxFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removeEditBoxFromParent", "(II)V" ) ; + if (voidremoveEditBoxFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removeEditBoxFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeEditBoxFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremoveEditBoxFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setLabelParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1117,17 +992,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetLabelParentjintjintID = curEnv->GetStaticMethodID(cls, "setLabelParent", "(II)V" ) ; + if (voidsetLabelParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setLabelParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setLabelParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetLabelParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removeLabelFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1138,17 +1009,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveLabelFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removeLabelFromParent", "(II)V" ) ; + if (voidremoveLabelFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removeLabelFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeLabelFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremoveLabelFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setCheckBoxParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1159,17 +1026,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetCheckBoxParentjintjintID = curEnv->GetStaticMethodID(cls, "setCheckBoxParent", "(II)V" ) ; + if (voidsetCheckBoxParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setCheckBoxParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setCheckBoxParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetCheckBoxParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removeCheckBoxFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1180,17 +1043,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveCheckBoxFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removeCheckBoxFromParent", "(II)V" ) ; + if (voidremoveCheckBoxFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removeCheckBoxFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeCheckBoxFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremoveCheckBoxFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setRadioButtonParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1201,17 +1060,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetRadioButtonParentjintjintID = curEnv->GetStaticMethodID(cls, "setRadioButtonParent", "(II)V" ) ; + if (voidsetRadioButtonParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setRadioButtonParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setRadioButtonParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetRadioButtonParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removeRadioButtonFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1222,17 +1077,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveRadioButtonFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removeRadioButtonFromParent", "(II)V" ) ; + if (voidremoveRadioButtonFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removeRadioButtonFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeRadioButtonFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremoveRadioButtonFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setSliderParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1243,17 +1094,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetSliderParentjintjintID = curEnv->GetStaticMethodID(cls, "setSliderParent", "(II)V" ) ; + if (voidsetSliderParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setSliderParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setSliderParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetSliderParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removeSliderFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1264,17 +1111,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveSliderFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removeSliderFromParent", "(II)V" ) ; + if (voidremoveSliderFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removeSliderFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeSliderFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremoveSliderFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setPopupMenuParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1285,17 +1128,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetPopupMenuParentjintjintID = curEnv->GetStaticMethodID(cls, "setPopupMenuParent", "(II)V" ) ; + if (voidsetPopupMenuParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setPopupMenuParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setPopupMenuParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetPopupMenuParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removePopupMenuFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1306,17 +1145,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremovePopupMenuFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removePopupMenuFromParent", "(II)V" ) ; + if (voidremovePopupMenuFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removePopupMenuFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removePopupMenuFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremovePopupMenuFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setListBoxParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1327,17 +1162,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetListBoxParentjintjintID = curEnv->GetStaticMethodID(cls, "setListBoxParent", "(II)V" ) ; + if (voidsetListBoxParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setListBoxParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setListBoxParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetListBoxParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removeListBoxFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1348,17 +1179,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveListBoxFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removeListBoxFromParent", "(II)V" ) ; + if (voidremoveListBoxFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removeListBoxFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeListBoxFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremoveListBoxFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFrameParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1369,17 +1196,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameParentjintjintID = curEnv->GetStaticMethodID(cls, "setFrameParent", "(II)V" ) ; + if (voidsetFrameParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetFrameParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removeFrameFromParent (JavaVM * jvm_, int parentID, int objID){ +@@ -1390,17 +1213,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveFrameFromParentjintjintID = curEnv->GetStaticMethodID(cls, "removeFrameFromParent", "(II)V" ) ; + if (voidremoveFrameFromParentjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "removeFrameFromParent" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeFrameFromParent"); + } + + curEnv->CallStaticVoidMethod(cls, voidremoveFrameFromParentjintjintID ,parentID, objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWidgetText (JavaVM * jvm_, int objID, char * text){ +@@ -1411,19 +1230,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetTextjintjstringID = curEnv->GetStaticMethodID(cls, "setWidgetText", "(ILjava/lang/String;)V" ) ; + if (voidsetWidgetTextjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetText" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetText"); + } + + jstring text_ = curEnv->NewStringUTF( text ); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetTextjintjstringID ,objID, text_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char * CallScilabBridge::getWidgetText (JavaVM * jvm_, int objID){ +@@ -1434,28 +1249,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetWidgetTextjintID = curEnv->GetStaticMethodID(cls, "getWidgetText", "(I)Ljava/lang/String;" ) ; + if (jstringgetWidgetTextjintID == NULL) { +-std::cerr << "Could not access to the method " << "getWidgetText" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getWidgetText"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetWidgetTextjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -1468,19 +1277,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameTextjintjstringID = curEnv->GetStaticMethodID(cls, "setFrameText", "(ILjava/lang/String;)V" ) ; + if (voidsetFrameTextjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameText" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameText"); + } + + jstring text_ = curEnv->NewStringUTF( text ); + + curEnv->CallStaticVoidMethod(cls, voidsetFrameTextjintjstringID ,objID, text_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char * CallScilabBridge::getFrameText (JavaVM * jvm_, int objID){ +@@ -1491,28 +1296,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetFrameTextjintID = curEnv->GetStaticMethodID(cls, "getFrameText", "(I)Ljava/lang/String;" ) ; + if (jstringgetFrameTextjintID == NULL) { +-std::cerr << "Could not access to the method " << "getFrameText" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFrameText"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetFrameTextjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -1525,17 +1324,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetBackgroundColorjintjintjintjintID = curEnv->GetStaticMethodID(cls, "setWidgetBackgroundColor", "(IIII)V" ) ; + if (voidsetWidgetBackgroundColorjintjintjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetBackgroundColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetBackgroundColor"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetBackgroundColorjintjintjintjintID ,objID, red, green, blue); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getWidgetBackgroundColor (JavaVM * jvm_, int objID){ +@@ -1546,9 +1341,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetWidgetBackgroundColorjintID = curEnv->GetStaticMethodID(cls, "getWidgetBackgroundColor", "(I)[I" ) ; + if (jintArraygetWidgetBackgroundColorjintID == NULL) { +-std::cerr << "Could not access to the method " << "getWidgetBackgroundColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getWidgetBackgroundColor"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetWidgetBackgroundColorjintID ,objID); +@@ -1566,11 +1359,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -1583,17 +1374,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetForegroundColorjintjintjintjintID = curEnv->GetStaticMethodID(cls, "setWidgetForegroundColor", "(IIII)V" ) ; + if (voidsetWidgetForegroundColorjintjintjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetForegroundColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetForegroundColor"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetForegroundColorjintjintjintjintID ,objID, red, green, blue); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getWidgetForegroundColor (JavaVM * jvm_, int objID){ +@@ -1604,9 +1391,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetWidgetForegroundColorjintID = curEnv->GetStaticMethodID(cls, "getWidgetForegroundColor", "(I)[I" ) ; + if (jintArraygetWidgetForegroundColorjintID == NULL) { +-std::cerr << "Could not access to the method " << "getWidgetForegroundColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getWidgetForegroundColor"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetWidgetForegroundColorjintID ,objID); +@@ -1624,11 +1409,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -1641,17 +1424,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameBackgroundColorjintjintjintjintID = curEnv->GetStaticMethodID(cls, "setFrameBackgroundColor", "(IIII)V" ) ; + if (voidsetFrameBackgroundColorjintjintjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameBackgroundColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameBackgroundColor"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetFrameBackgroundColorjintjintjintjintID ,objID, red, green, blue); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getFrameBackgroundColor (JavaVM * jvm_, int objID){ +@@ -1662,9 +1441,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetFrameBackgroundColorjintID = curEnv->GetStaticMethodID(cls, "getFrameBackgroundColor", "(I)[I" ) ; + if (jintArraygetFrameBackgroundColorjintID == NULL) { +-std::cerr << "Could not access to the method " << "getFrameBackgroundColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFrameBackgroundColor"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetFrameBackgroundColorjintID ,objID); +@@ -1682,11 +1459,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -1699,17 +1474,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameForegroundColorjintjintjintjintID = curEnv->GetStaticMethodID(cls, "setFrameForegroundColor", "(IIII)V" ) ; + if (voidsetFrameForegroundColorjintjintjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameForegroundColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameForegroundColor"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetFrameForegroundColorjintjintjintjintID ,objID, red, green, blue); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getFrameForegroundColor (JavaVM * jvm_, int objID){ +@@ -1720,9 +1491,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetFrameForegroundColorjintID = curEnv->GetStaticMethodID(cls, "getFrameForegroundColor", "(I)[I" ) ; + if (jintArraygetFrameForegroundColorjintID == NULL) { +-std::cerr << "Could not access to the method " << "getFrameForegroundColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFrameForegroundColor"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetFrameForegroundColorjintID ,objID); +@@ -1740,11 +1509,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -1757,19 +1524,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetFontNamejintjstringID = curEnv->GetStaticMethodID(cls, "setWidgetFontName", "(ILjava/lang/String;)V" ) ; + if (voidsetWidgetFontNamejintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetFontName" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetFontName"); + } + + jstring name_ = curEnv->NewStringUTF( name ); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetFontNamejintjstringID ,objID, name_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char * CallScilabBridge::getWidgetFontName (JavaVM * jvm_, int objID){ +@@ -1780,28 +1543,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetWidgetFontNamejintID = curEnv->GetStaticMethodID(cls, "getWidgetFontName", "(I)Ljava/lang/String;" ) ; + if (jstringgetWidgetFontNamejintID == NULL) { +-std::cerr << "Could not access to the method " << "getWidgetFontName" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getWidgetFontName"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetWidgetFontNamejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -1814,19 +1571,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetFontWeightjintjstringID = curEnv->GetStaticMethodID(cls, "setWidgetFontWeight", "(ILjava/lang/String;)V" ) ; + if (voidsetWidgetFontWeightjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetFontWeight" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetFontWeight"); + } + + jstring weight_ = curEnv->NewStringUTF( weight ); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetFontWeightjintjstringID ,objID, weight_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWidgetFontSize (JavaVM * jvm_, int objID, int size){ +@@ -1837,17 +1590,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetFontSizejintjintID = curEnv->GetStaticMethodID(cls, "setWidgetFontSize", "(II)V" ) ; + if (voidsetWidgetFontSizejintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetFontSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetFontSize"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetFontSizejintjintID ,objID, size); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::getWidgetFontSize (JavaVM * jvm_, int objID){ +@@ -1858,17 +1607,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetWidgetFontSizejintID = curEnv->GetStaticMethodID(cls, "getWidgetFontSize", "(I)I" ) ; + if (jintgetWidgetFontSizejintID == NULL) { +-std::cerr << "Could not access to the method " << "getWidgetFontSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getWidgetFontSize"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetWidgetFontSizejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -1881,19 +1626,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetFontAnglejintjstringID = curEnv->GetStaticMethodID(cls, "setWidgetFontAngle", "(ILjava/lang/String;)V" ) ; + if (voidsetWidgetFontAnglejintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetFontAngle" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetFontAngle"); + } + + jstring angle_ = curEnv->NewStringUTF( angle ); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetFontAnglejintjstringID ,objID, angle_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFrameFontName (JavaVM * jvm_, int objID, char * name){ +@@ -1904,19 +1645,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameFontNamejintjstringID = curEnv->GetStaticMethodID(cls, "setFrameFontName", "(ILjava/lang/String;)V" ) ; + if (voidsetFrameFontNamejintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameFontName" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameFontName"); + } + + jstring name_ = curEnv->NewStringUTF( name ); + + curEnv->CallStaticVoidMethod(cls, voidsetFrameFontNamejintjstringID ,objID, name_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char * CallScilabBridge::getFrameFontName (JavaVM * jvm_, int objID){ +@@ -1927,28 +1664,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetFrameFontNamejintID = curEnv->GetStaticMethodID(cls, "getFrameFontName", "(I)Ljava/lang/String;" ) ; + if (jstringgetFrameFontNamejintID == NULL) { +-std::cerr << "Could not access to the method " << "getFrameFontName" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFrameFontName"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetFrameFontNamejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -1961,19 +1692,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameFontWeightjintjstringID = curEnv->GetStaticMethodID(cls, "setFrameFontWeight", "(ILjava/lang/String;)V" ) ; + if (voidsetFrameFontWeightjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameFontWeight" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameFontWeight"); + } + + jstring weight_ = curEnv->NewStringUTF( weight ); + + curEnv->CallStaticVoidMethod(cls, voidsetFrameFontWeightjintjstringID ,objID, weight_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFrameFontSize (JavaVM * jvm_, int objID, int size){ +@@ -1984,17 +1711,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameFontSizejintjintID = curEnv->GetStaticMethodID(cls, "setFrameFontSize", "(II)V" ) ; + if (voidsetFrameFontSizejintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameFontSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameFontSize"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetFrameFontSizejintjintID ,objID, size); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::getFrameFontSize (JavaVM * jvm_, int objID){ +@@ -2005,17 +1728,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetFrameFontSizejintID = curEnv->GetStaticMethodID(cls, "getFrameFontSize", "(I)I" ) ; + if (jintgetFrameFontSizejintID == NULL) { +-std::cerr << "Could not access to the method " << "getFrameFontSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFrameFontSize"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetFrameFontSizejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -2028,19 +1747,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameFontAnglejintjstringID = curEnv->GetStaticMethodID(cls, "setFrameFontAngle", "(ILjava/lang/String;)V" ) ; + if (voidsetFrameFontAnglejintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameFontAngle" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameFontAngle"); + } + + jstring angle_ = curEnv->NewStringUTF( angle ); + + curEnv->CallStaticVoidMethod(cls, voidsetFrameFontAnglejintjstringID ,objID, angle_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWidgetPosition (JavaVM * jvm_, int objID, int x, int y, int width, int height){ +@@ -2051,17 +1766,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetPositionjintjintjintjintjintID = curEnv->GetStaticMethodID(cls, "setWidgetPosition", "(IIIII)V" ) ; + if (voidsetWidgetPositionjintjintjintjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetPosition" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetPosition"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetPositionjintjintjintjintjintID ,objID, x, y, width, height); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getWidgetPosition (JavaVM * jvm_, int objID){ +@@ -2072,9 +1783,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetWidgetPositionjintID = curEnv->GetStaticMethodID(cls, "getWidgetPosition", "(I)[I" ) ; + if (jintArraygetWidgetPositionjintID == NULL) { +-std::cerr << "Could not access to the method " << "getWidgetPosition" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getWidgetPosition"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetWidgetPositionjintID ,objID); +@@ -2092,11 +1801,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -2109,17 +1816,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFramePositionjintjintjintjintjintID = curEnv->GetStaticMethodID(cls, "setFramePosition", "(IIIII)V" ) ; + if (voidsetFramePositionjintjintjintjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setFramePosition" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFramePosition"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetFramePositionjintjintjintjintjintID ,objID, x, y, width, height); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getFramePosition (JavaVM * jvm_, int objID){ +@@ -2130,9 +1833,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetFramePositionjintID = curEnv->GetStaticMethodID(cls, "getFramePosition", "(I)[I" ) ; + if (jintArraygetFramePositionjintID == NULL) { +-std::cerr << "Could not access to the method " << "getFramePosition" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFramePosition"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetFramePositionjintID ,objID); +@@ -2150,11 +1851,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -2167,19 +1866,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetCallbackjintjstringjintID = curEnv->GetStaticMethodID(cls, "setWidgetCallback", "(ILjava/lang/String;I)V" ) ; + if (voidsetWidgetCallbackjintjstringjintID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetCallback" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetCallback"); + } + + jstring text_ = curEnv->NewStringUTF( text ); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetCallbackjintjstringjintID ,objID, text_, type); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFrameCallback (JavaVM * jvm_, int objID, char * text, int type){ +@@ -2190,19 +1885,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameCallbackjintjstringjintID = curEnv->GetStaticMethodID(cls, "setFrameCallback", "(ILjava/lang/String;I)V" ) ; + if (voidsetFrameCallbackjintjstringjintID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameCallback" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameCallback"); + } + + jstring text_ = curEnv->NewStringUTF( text ); + + curEnv->CallStaticVoidMethod(cls, voidsetFrameCallbackjintjstringjintID ,objID, text_, type); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWidgetHorizontalAlignment (JavaVM * jvm_, int objID, char * alignment){ +@@ -2213,19 +1904,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetHorizontalAlignmentjintjstringID = curEnv->GetStaticMethodID(cls, "setWidgetHorizontalAlignment", "(ILjava/lang/String;)V" ) ; + if (voidsetWidgetHorizontalAlignmentjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetHorizontalAlignment" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetHorizontalAlignment"); + } + + jstring alignment_ = curEnv->NewStringUTF( alignment ); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetHorizontalAlignmentjintjstringID ,objID, alignment_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWidgetVerticalAlignment (JavaVM * jvm_, int objID, char * alignment){ +@@ -2236,19 +1923,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetVerticalAlignmentjintjstringID = curEnv->GetStaticMethodID(cls, "setWidgetVerticalAlignment", "(ILjava/lang/String;)V" ) ; + if (voidsetWidgetVerticalAlignmentjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetVerticalAlignment" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetVerticalAlignment"); + } + + jstring alignment_ = curEnv->NewStringUTF( alignment ); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetVerticalAlignmentjintjstringID ,objID, alignment_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setSliderMinorTickSpacing (JavaVM * jvm_, int objID, int space){ +@@ -2259,17 +1942,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetSliderMinorTickSpacingjintjintID = curEnv->GetStaticMethodID(cls, "setSliderMinorTickSpacing", "(II)V" ) ; + if (voidsetSliderMinorTickSpacingjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setSliderMinorTickSpacing" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setSliderMinorTickSpacing"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetSliderMinorTickSpacingjintjintID ,objID, space); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setSliderMajorTickSpacing (JavaVM * jvm_, int objID, int space){ +@@ -2280,17 +1959,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetSliderMajorTickSpacingjintjintID = curEnv->GetStaticMethodID(cls, "setSliderMajorTickSpacing", "(II)V" ) ; + if (voidsetSliderMajorTickSpacingjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setSliderMajorTickSpacing" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setSliderMajorTickSpacing"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetSliderMajorTickSpacingjintjintID ,objID, space); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setListBoxSelectedIndices (JavaVM * jvm_, int objID, int * indices, int indicesSize){ +@@ -2301,23 +1976,25 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetListBoxSelectedIndicesjintjintArrayID = curEnv->GetStaticMethodID(cls, "setListBoxSelectedIndices", "(I[I)V" ) ; + if (voidsetListBoxSelectedIndicesjintjintArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setListBoxSelectedIndices" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setListBoxSelectedIndices"); + } + + jintArray indices_ = curEnv->NewIntArray( indicesSize ) ; + ++if (indices_ == NULL) ++{ ++// check that allocation succeed ++throw GiwsException::JniBadAllocException(curEnv); ++} ++ + curEnv->SetIntArrayRegion( indices_, 0, indicesSize, (jint*) indices ) ; + + + curEnv->CallStaticVoidMethod(cls, voidsetListBoxSelectedIndicesjintjintArrayID ,objID, indices_); + curEnv->DeleteLocalRef(indices_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getListBoxSelectedIndices (JavaVM * jvm_, int objID){ +@@ -2328,9 +2005,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetListBoxSelectedIndicesjintID = curEnv->GetStaticMethodID(cls, "getListBoxSelectedIndices", "(I)[I" ) ; + if (jintArraygetListBoxSelectedIndicesjintID == NULL) { +-std::cerr << "Could not access to the method " << "getListBoxSelectedIndices" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getListBoxSelectedIndices"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetListBoxSelectedIndicesjintID ,objID); +@@ -2348,11 +2023,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -2365,17 +2038,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetListBoxSelectionSizejintID = curEnv->GetStaticMethodID(cls, "getListBoxSelectionSize", "(I)I" ) ; + if (jintgetListBoxSelectionSizejintID == NULL) { +-std::cerr << "Could not access to the method " << "getListBoxSelectionSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getListBoxSelectionSize"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetListBoxSelectionSizejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -2388,17 +2057,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetPopupMenuSelectedIndexjintjintID = curEnv->GetStaticMethodID(cls, "setPopupMenuSelectedIndex", "(II)V" ) ; + if (voidsetPopupMenuSelectedIndexjintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setPopupMenuSelectedIndex" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setPopupMenuSelectedIndex"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetPopupMenuSelectedIndexjintjintID ,objID, index); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::getPopupMenuSelectedIndex (JavaVM * jvm_, int objID){ +@@ -2409,17 +2074,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetPopupMenuSelectedIndexjintID = curEnv->GetStaticMethodID(cls, "getPopupMenuSelectedIndex", "(I)I" ) ; + if (jintgetPopupMenuSelectedIndexjintID == NULL) { +-std::cerr << "Could not access to the method " << "getPopupMenuSelectedIndex" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getPopupMenuSelectedIndex"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetPopupMenuSelectedIndexjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -2432,17 +2093,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetSliderValuejintjintID = curEnv->GetStaticMethodID(cls, "setSliderValue", "(II)V" ) ; + if (voidsetSliderValuejintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setSliderValue" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setSliderValue"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetSliderValuejintjintID ,objID, index); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::getSliderValue (JavaVM * jvm_, int objID){ +@@ -2453,17 +2110,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetSliderValuejintID = curEnv->GetStaticMethodID(cls, "getSliderValue", "(I)I" ) ; + if (jintgetSliderValuejintID == NULL) { +-std::cerr << "Could not access to the method " << "getSliderValue" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getSliderValue"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetSliderValuejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -2476,19 +2129,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetRadioButtonCheckedjintjbooleanID = curEnv->GetStaticMethodID(cls, "setRadioButtonChecked", "(IZ)V" ) ; + if (voidsetRadioButtonCheckedjintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setRadioButtonChecked" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setRadioButtonChecked"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetRadioButtonCheckedjintjbooleanID ,objID, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + bool CallScilabBridge::isRadioButtonChecked (JavaVM * jvm_, int objID){ +@@ -2499,17 +2148,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanisRadioButtonCheckedjintID = curEnv->GetStaticMethodID(cls, "isRadioButtonChecked", "(I)Z" ) ; + if (jbooleanisRadioButtonCheckedjintID == NULL) { +-std::cerr << "Could not access to the method " << "isRadioButtonChecked" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "isRadioButtonChecked"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanisRadioButtonCheckedjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -2522,19 +2167,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetCheckBoxCheckedjintjbooleanID = curEnv->GetStaticMethodID(cls, "setCheckBoxChecked", "(IZ)V" ) ; + if (voidsetCheckBoxCheckedjintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setCheckBoxChecked" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setCheckBoxChecked"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetCheckBoxCheckedjintjbooleanID ,objID, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + bool CallScilabBridge::isCheckBoxChecked (JavaVM * jvm_, int objID){ +@@ -2545,17 +2186,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanisCheckBoxCheckedjintID = curEnv->GetStaticMethodID(cls, "isCheckBoxChecked", "(I)Z" ) ; + if (jbooleanisCheckBoxCheckedjintID == NULL) { +-std::cerr << "Could not access to the method " << "isCheckBoxChecked" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "isCheckBoxChecked"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanisCheckBoxCheckedjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -2568,17 +2205,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetSliderMinValuejintjintID = curEnv->GetStaticMethodID(cls, "setSliderMinValue", "(II)V" ) ; + if (voidsetSliderMinValuejintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setSliderMinValue" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setSliderMinValue"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetSliderMinValuejintjintID ,objID, value); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setSliderMaxValue (JavaVM * jvm_, int objID, int value){ +@@ -2589,17 +2222,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetSliderMaxValuejintjintID = curEnv->GetStaticMethodID(cls, "setSliderMaxValue", "(II)V" ) ; + if (voidsetSliderMaxValuejintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setSliderMaxValue" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setSliderMaxValue"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetSliderMaxValuejintjintID ,objID, value); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setSliderVertical (JavaVM * jvm_, int objID){ +@@ -2610,17 +2239,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetSliderVerticaljintID = curEnv->GetStaticMethodID(cls, "setSliderVertical", "(I)V" ) ; + if (voidsetSliderVerticaljintID == NULL) { +-std::cerr << "Could not access to the method " << "setSliderVertical" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setSliderVertical"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetSliderVerticaljintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setSliderHorizontal (JavaVM * jvm_, int objID){ +@@ -2631,17 +2256,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetSliderHorizontaljintID = curEnv->GetStaticMethodID(cls, "setSliderHorizontal", "(I)V" ) ; + if (voidsetSliderHorizontaljintID == NULL) { +-std::cerr << "Could not access to the method " << "setSliderHorizontal" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setSliderHorizontal"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetSliderHorizontaljintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setListBoxMultipleSelectionEnabled (JavaVM * jvm_, int objID, bool status){ +@@ -2652,19 +2273,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetListBoxMultipleSelectionEnabledjintjbooleanID = curEnv->GetStaticMethodID(cls, "setListBoxMultipleSelectionEnabled", "(IZ)V" ) ; + if (voidsetListBoxMultipleSelectionEnabledjintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setListBoxMultipleSelectionEnabled" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setListBoxMultipleSelectionEnabled"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetListBoxMultipleSelectionEnabledjintjbooleanID ,objID, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char ** CallScilabBridge::getListBoxAllItemsText (JavaVM * jvm_, int objID){ +@@ -2675,17 +2292,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jobjectArraygetListBoxAllItemsTextjintID = curEnv->GetStaticMethodID(cls, "getListBoxAllItemsText", "(I)[Ljava/lang/String;" ) ; + if (jobjectArraygetListBoxAllItemsTextjintID == NULL) { +-std::cerr << "Could not access to the method " << "getListBoxAllItemsText" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getListBoxAllItemsText"); + } + + jobjectArray res = (jobjectArray) curEnv->CallObjectMethod(cls, jobjectArraygetListBoxAllItemsTextjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + jsize len = curEnv->GetArrayLength(res); + char **arrayOfString; + arrayOfString= arrayOfString= new char *[len + 1]; +@@ -2698,11 +2311,9 @@ strcpy(arrayOfString[i], tempString); + curEnv->ReleaseStringUTFChars(resString, tempString); + curEnv->DeleteLocalRef(resString); + } +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + curEnv->DeleteLocalRef(res); + return arrayOfString; + +@@ -2716,17 +2327,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetListBoxNumberOfItemsjintID = curEnv->GetStaticMethodID(cls, "getListBoxNumberOfItems", "(I)I" ) ; + if (jintgetListBoxNumberOfItemsjintID == NULL) { +-std::cerr << "Could not access to the method " << "getListBoxNumberOfItems" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getListBoxNumberOfItems"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetListBoxNumberOfItemsjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -2739,9 +2346,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetListBoxTextjintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setListBoxText", "(I[Ljava/lang/String;)V" ) ; + if (voidsetListBoxTextjintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setListBoxText" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setListBoxText"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -2749,8 +2354,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray text_ = curEnv->NewObjectArray( textSize, stringArrayClass, NULL); + if (text_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -2759,8 +2363,7 @@ for ( int i = 0; i < textSize; i++) + jstring TempString = curEnv->NewStringUTF( text[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( text_, i, TempString); +@@ -2771,11 +2374,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetListBoxTextjintjobjectArrayID ,objID, text_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(text_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char ** CallScilabBridge::getPopupMenuAllItemsText (JavaVM * jvm_, int objID){ +@@ -2786,17 +2387,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jobjectArraygetPopupMenuAllItemsTextjintID = curEnv->GetStaticMethodID(cls, "getPopupMenuAllItemsText", "(I)[Ljava/lang/String;" ) ; + if (jobjectArraygetPopupMenuAllItemsTextjintID == NULL) { +-std::cerr << "Could not access to the method " << "getPopupMenuAllItemsText" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getPopupMenuAllItemsText"); + } + + jobjectArray res = (jobjectArray) curEnv->CallObjectMethod(cls, jobjectArraygetPopupMenuAllItemsTextjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + jsize len = curEnv->GetArrayLength(res); + char **arrayOfString; + arrayOfString= arrayOfString= new char *[len + 1]; +@@ -2809,11 +2406,9 @@ strcpy(arrayOfString[i], tempString); + curEnv->ReleaseStringUTFChars(resString, tempString); + curEnv->DeleteLocalRef(resString); + } +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + curEnv->DeleteLocalRef(res); + return arrayOfString; + +@@ -2827,17 +2422,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetPopupMenuNumberOfItemsjintID = curEnv->GetStaticMethodID(cls, "getPopupMenuNumberOfItems", "(I)I" ) ; + if (jintgetPopupMenuNumberOfItemsjintID == NULL) { +-std::cerr << "Could not access to the method " << "getPopupMenuNumberOfItems" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getPopupMenuNumberOfItems"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetPopupMenuNumberOfItemsjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -2850,9 +2441,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetPopupMenuTextjintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setPopupMenuText", "(I[Ljava/lang/String;)V" ) ; + if (voidsetPopupMenuTextjintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setPopupMenuText" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setPopupMenuText"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -2860,8 +2449,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray text_ = curEnv->NewObjectArray( textSize, stringArrayClass, NULL); + if (text_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -2870,8 +2458,7 @@ for ( int i = 0; i < textSize; i++) + jstring TempString = curEnv->NewStringUTF( text[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( text_, i, TempString); +@@ -2882,11 +2469,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetPopupMenuTextjintjobjectArrayID ,objID, text_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(text_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWidgetRelief (JavaVM * jvm_, int objID, char * reliefType){ +@@ -2897,19 +2482,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetReliefjintjstringID = curEnv->GetStaticMethodID(cls, "setWidgetRelief", "(ILjava/lang/String;)V" ) ; + if (voidsetWidgetReliefjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetRelief" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetRelief"); + } + + jstring reliefType_ = curEnv->NewStringUTF( reliefType ); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetReliefjintjstringID ,objID, reliefType_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFrameRelief (JavaVM * jvm_, int objID, char * reliefType){ +@@ -2920,19 +2501,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameReliefjintjstringID = curEnv->GetStaticMethodID(cls, "setFrameRelief", "(ILjava/lang/String;)V" ) ; + if (voidsetFrameReliefjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameRelief" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameRelief"); + } + + jstring reliefType_ = curEnv->NewStringUTF( reliefType ); + + curEnv->CallStaticVoidMethod(cls, voidsetFrameReliefjintjstringID ,objID, reliefType_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setRootMenuEnabled (JavaVM * jvm_, char * menuName, bool status){ +@@ -2943,9 +2520,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetRootMenuEnabledjstringjbooleanID = curEnv->GetStaticMethodID(cls, "setRootMenuEnabled", "(Ljava/lang/String;Z)V" ) ; + if (voidsetRootMenuEnabledjstringjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setRootMenuEnabled" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setRootMenuEnabled"); + } + + jstring menuName_ = curEnv->NewStringUTF( menuName ); +@@ -2953,11 +2528,9 @@ jstring menuName_ = curEnv->NewStringUTF( menuName ); + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetRootMenuEnabledjstringjbooleanID ,menuName_, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setRootSubMenuEnabled (JavaVM * jvm_, char * menuName, int position, bool status){ +@@ -2968,9 +2541,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetRootSubMenuEnabledjstringjintjbooleanID = curEnv->GetStaticMethodID(cls, "setRootSubMenuEnabled", "(Ljava/lang/String;IZ)V" ) ; + if (voidsetRootSubMenuEnabledjstringjintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setRootSubMenuEnabled" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setRootSubMenuEnabled"); + } + + jstring menuName_ = curEnv->NewStringUTF( menuName ); +@@ -2978,11 +2549,9 @@ jstring menuName_ = curEnv->NewStringUTF( menuName ); + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetRootSubMenuEnabledjstringjintjbooleanID ,menuName_, position, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFigureMenuEnabled (JavaVM * jvm_, int figureID, char * menuName, bool status){ +@@ -2993,9 +2562,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFigureMenuEnabledjintjstringjbooleanID = curEnv->GetStaticMethodID(cls, "setFigureMenuEnabled", "(ILjava/lang/String;Z)V" ) ; + if (voidsetFigureMenuEnabledjintjstringjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setFigureMenuEnabled" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFigureMenuEnabled"); + } + + jstring menuName_ = curEnv->NewStringUTF( menuName ); +@@ -3003,11 +2570,9 @@ jstring menuName_ = curEnv->NewStringUTF( menuName ); + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetFigureMenuEnabledjintjstringjbooleanID ,figureID, menuName_, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFigureSubMenuEnabled (JavaVM * jvm_, int figureID, char * menuName, int position, bool status){ +@@ -3018,9 +2583,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFigureSubMenuEnabledjintjstringjintjbooleanID = curEnv->GetStaticMethodID(cls, "setFigureSubMenuEnabled", "(ILjava/lang/String;IZ)V" ) ; + if (voidsetFigureSubMenuEnabledjintjstringjintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setFigureSubMenuEnabled" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFigureSubMenuEnabled"); + } + + jstring menuName_ = curEnv->NewStringUTF( menuName ); +@@ -3028,11 +2591,9 @@ jstring menuName_ = curEnv->NewStringUTF( menuName ); + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetFigureSubMenuEnabledjintjstringjintjbooleanID ,figureID, menuName_, position, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWidgetEnable (JavaVM * jvm_, int objID, bool status){ +@@ -3043,19 +2604,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetEnablejintjbooleanID = curEnv->GetStaticMethodID(cls, "setWidgetEnable", "(IZ)V" ) ; + if (voidsetWidgetEnablejintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetEnable" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetEnable"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetEnablejintjbooleanID ,objID, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFrameEnable (JavaVM * jvm_, int objID, bool status){ +@@ -3066,19 +2623,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameEnablejintjbooleanID = curEnv->GetStaticMethodID(cls, "setFrameEnable", "(IZ)V" ) ; + if (voidsetFrameEnablejintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameEnable" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameEnable"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetFrameEnablejintjbooleanID ,objID, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + bool CallScilabBridge::isWidgetEnable (JavaVM * jvm_, int objID){ +@@ -3089,17 +2642,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanisWidgetEnablejintID = curEnv->GetStaticMethodID(cls, "isWidgetEnable", "(I)Z" ) ; + if (jbooleanisWidgetEnablejintID == NULL) { +-std::cerr << "Could not access to the method " << "isWidgetEnable" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "isWidgetEnable"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanisWidgetEnablejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -3112,17 +2661,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanisFrameEnablejintID = curEnv->GetStaticMethodID(cls, "isFrameEnable", "(I)Z" ) ; + if (jbooleanisFrameEnablejintID == NULL) { +-std::cerr << "Could not access to the method " << "isFrameEnable" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "isFrameEnable"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanisFrameEnablejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -3135,19 +2680,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveRootMenujstringID = curEnv->GetStaticMethodID(cls, "removeRootMenu", "(Ljava/lang/String;)V" ) ; + if (voidremoveRootMenujstringID == NULL) { +-std::cerr << "Could not access to the method " << "removeRootMenu" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeRootMenu"); + } + + jstring menuName_ = curEnv->NewStringUTF( menuName ); + + curEnv->CallStaticVoidMethod(cls, voidremoveRootMenujstringID ,menuName_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::removeFigureMenu (JavaVM * jvm_, int figureID, char * menuName){ +@@ -3158,19 +2699,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidremoveFigureMenujintjstringID = curEnv->GetStaticMethodID(cls, "removeFigureMenu", "(ILjava/lang/String;)V" ) ; + if (voidremoveFigureMenujintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "removeFigureMenu" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "removeFigureMenu"); + } + + jstring menuName_ = curEnv->NewStringUTF( menuName ); + + curEnv->CallStaticVoidMethod(cls, voidremoveFigureMenujintjstringID ,figureID, menuName_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char * CallScilabBridge::displayAndWaitContextMenu (JavaVM * jvm_, int ID){ +@@ -3181,28 +2718,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringdisplayAndWaitContextMenujintID = curEnv->GetStaticMethodID(cls, "displayAndWaitContextMenu", "(I)Ljava/lang/String;" ) ; + if (jstringdisplayAndWaitContextMenujintID == NULL) { +-std::cerr << "Could not access to the method " << "displayAndWaitContextMenu" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "displayAndWaitContextMenu"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringdisplayAndWaitContextMenujintID ,ID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -3215,17 +2746,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewMessageBoxID = curEnv->GetStaticMethodID(cls, "newMessageBox", "()I" ) ; + if (jintnewMessageBoxID == NULL) { +-std::cerr << "Could not access to the method " << "newMessageBox" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newMessageBox"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewMessageBoxID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -3238,19 +2765,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxTitlejintjstringID = curEnv->GetStaticMethodID(cls, "setMessageBoxTitle", "(ILjava/lang/String;)V" ) ; + if (voidsetMessageBoxTitlejintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxTitle" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxTitle"); + } + + jstring title_ = curEnv->NewStringUTF( title ); + + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxTitlejintjstringID ,id, title_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setMessageBoxMessage (JavaVM * jvm_, int id, char * message){ +@@ -3261,19 +2784,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxMessagejintjstringID = curEnv->GetStaticMethodID(cls, "setMessageBoxMessage", "(ILjava/lang/String;)V" ) ; + if (voidsetMessageBoxMessagejintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxMessage" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxMessage"); + } + + jstring message_ = curEnv->NewStringUTF( message ); + + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxMessagejintjstringID ,id, message_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setMessageBoxMessage (JavaVM * jvm_, int id, char ** message, int messageSize){ +@@ -3284,9 +2803,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxMessagejintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setMessageBoxMessage", "(I[Ljava/lang/String;)V" ) ; + if (voidsetMessageBoxMessagejintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxMessage" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxMessage"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -3294,8 +2811,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray message_ = curEnv->NewObjectArray( messageSize, stringArrayClass, NULL); + if (message_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -3304,8 +2820,7 @@ for ( int i = 0; i < messageSize; i++) + jstring TempString = curEnv->NewStringUTF( message[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( message_, i, TempString); +@@ -3316,11 +2831,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxMessagejintjobjectArrayID ,id, message_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(message_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::messageBoxDisplayAndWait (JavaVM * jvm_, int id){ +@@ -3331,17 +2844,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidmessageBoxDisplayAndWaitjintID = curEnv->GetStaticMethodID(cls, "messageBoxDisplayAndWait", "(I)V" ) ; + if (voidmessageBoxDisplayAndWaitjintID == NULL) { +-std::cerr << "Could not access to the method " << "messageBoxDisplayAndWait" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "messageBoxDisplayAndWait"); + } + + curEnv->CallStaticVoidMethod(cls, voidmessageBoxDisplayAndWaitjintID ,id); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::getMessageBoxSelectedButton (JavaVM * jvm_, int id){ +@@ -3352,17 +2861,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetMessageBoxSelectedButtonjintID = curEnv->GetStaticMethodID(cls, "getMessageBoxSelectedButton", "(I)I" ) ; + if (jintgetMessageBoxSelectedButtonjintID == NULL) { +-std::cerr << "Could not access to the method " << "getMessageBoxSelectedButton" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getMessageBoxSelectedButton"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetMessageBoxSelectedButtonjintID ,id); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -3375,23 +2880,25 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxDefaultSelectedButtonsjintjintArrayID = curEnv->GetStaticMethodID(cls, "setMessageBoxDefaultSelectedButtons", "(I[I)V" ) ; + if (voidsetMessageBoxDefaultSelectedButtonsjintjintArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxDefaultSelectedButtons" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxDefaultSelectedButtons"); + } + + jintArray index_ = curEnv->NewIntArray( indexSize ) ; + ++if (index_ == NULL) ++{ ++// check that allocation succeed ++throw GiwsException::JniBadAllocException(curEnv); ++} ++ + curEnv->SetIntArrayRegion( index_, 0, indexSize, (jint*) index ) ; + + + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxDefaultSelectedButtonsjintjintArrayID ,id, index_); + curEnv->DeleteLocalRef(index_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getMessageBoxUserSelectedButtons (JavaVM * jvm_, int id){ +@@ -3402,9 +2909,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetMessageBoxUserSelectedButtonsjintID = curEnv->GetStaticMethodID(cls, "getMessageBoxUserSelectedButtons", "(I)[I" ) ; + if (jintArraygetMessageBoxUserSelectedButtonsjintID == NULL) { +-std::cerr << "Could not access to the method " << "getMessageBoxUserSelectedButtons" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getMessageBoxUserSelectedButtons"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetMessageBoxUserSelectedButtonsjintID ,id); +@@ -3422,11 +2927,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -3439,9 +2942,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxButtonsLabelsjintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setMessageBoxButtonsLabels", "(I[Ljava/lang/String;)V" ) ; + if (voidsetMessageBoxButtonsLabelsjintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxButtonsLabels" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxButtonsLabels"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -3449,8 +2950,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray labels_ = curEnv->NewObjectArray( labelsSize, stringArrayClass, NULL); + if (labels_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -3459,8 +2959,7 @@ for ( int i = 0; i < labelsSize; i++) + jstring TempString = curEnv->NewStringUTF( labels[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( labels_, i, TempString); +@@ -3471,11 +2970,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxButtonsLabelsjintjobjectArrayID ,id, labels_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(labels_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setMessageBoxInitialValue (JavaVM * jvm_, int id, char ** value, int valueSize){ +@@ -3486,9 +2983,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxInitialValuejintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setMessageBoxInitialValue", "(I[Ljava/lang/String;)V" ) ; + if (voidsetMessageBoxInitialValuejintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxInitialValue" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxInitialValue"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -3496,8 +2991,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray value_ = curEnv->NewObjectArray( valueSize, stringArrayClass, NULL); + if (value_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -3506,8 +3000,7 @@ for ( int i = 0; i < valueSize; i++) + jstring TempString = curEnv->NewStringUTF( value[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( value_, i, TempString); +@@ -3518,11 +3011,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxInitialValuejintjobjectArrayID ,id, value_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(value_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char ** CallScilabBridge::getMessageBoxValue (JavaVM * jvm_, int id){ +@@ -3533,17 +3024,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jobjectArraygetMessageBoxValuejintID = curEnv->GetStaticMethodID(cls, "getMessageBoxValue", "(I)[Ljava/lang/String;" ) ; + if (jobjectArraygetMessageBoxValuejintID == NULL) { +-std::cerr << "Could not access to the method " << "getMessageBoxValue" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getMessageBoxValue"); + } + + jobjectArray res = (jobjectArray) curEnv->CallObjectMethod(cls, jobjectArraygetMessageBoxValuejintID ,id); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + jsize len = curEnv->GetArrayLength(res); + char **arrayOfString; + arrayOfString= arrayOfString= new char *[len + 1]; +@@ -3556,11 +3043,9 @@ strcpy(arrayOfString[i], tempString); + curEnv->ReleaseStringUTFChars(resString, tempString); + curEnv->DeleteLocalRef(resString); + } +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + curEnv->DeleteLocalRef(res); + return arrayOfString; + +@@ -3574,17 +3059,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetMessageBoxValueSizejintID = curEnv->GetStaticMethodID(cls, "getMessageBoxValueSize", "(I)I" ) ; + if (jintgetMessageBoxValueSizejintID == NULL) { +-std::cerr << "Could not access to the method " << "getMessageBoxValueSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getMessageBoxValueSize"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetMessageBoxValueSizejintID ,id); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -3597,9 +3078,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxListBoxItemsjintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setMessageBoxListBoxItems", "(I[Ljava/lang/String;)V" ) ; + if (voidsetMessageBoxListBoxItemsjintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxListBoxItems" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxListBoxItems"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -3607,8 +3086,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray items_ = curEnv->NewObjectArray( itemsSize, stringArrayClass, NULL); + if (items_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -3617,8 +3095,7 @@ for ( int i = 0; i < itemsSize; i++) + jstring TempString = curEnv->NewStringUTF( items[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( items_, i, TempString); +@@ -3629,11 +3106,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxListBoxItemsjintjobjectArrayID ,id, items_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(items_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::getMessageBoxSelectedItem (JavaVM * jvm_, int id){ +@@ -3644,17 +3119,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetMessageBoxSelectedItemjintID = curEnv->GetStaticMethodID(cls, "getMessageBoxSelectedItem", "(I)I" ) ; + if (jintgetMessageBoxSelectedItemjintID == NULL) { +-std::cerr << "Could not access to the method " << "getMessageBoxSelectedItem" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getMessageBoxSelectedItem"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetMessageBoxSelectedItemjintID ,id); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -3667,9 +3138,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxLineLabelsjintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setMessageBoxLineLabels", "(I[Ljava/lang/String;)V" ) ; + if (voidsetMessageBoxLineLabelsjintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxLineLabels" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxLineLabels"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -3677,8 +3146,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray labels_ = curEnv->NewObjectArray( labelsSize, stringArrayClass, NULL); + if (labels_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -3687,8 +3155,7 @@ for ( int i = 0; i < labelsSize; i++) + jstring TempString = curEnv->NewStringUTF( labels[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( labels_, i, TempString); +@@ -3699,11 +3166,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxLineLabelsjintjobjectArrayID ,id, labels_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(labels_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setMessageBoxColumnLabels (JavaVM * jvm_, int id, char ** labels, int labelsSize){ +@@ -3714,9 +3179,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxColumnLabelsjintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setMessageBoxColumnLabels", "(I[Ljava/lang/String;)V" ) ; + if (voidsetMessageBoxColumnLabelsjintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxColumnLabels" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxColumnLabels"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -3724,8 +3187,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray labels_ = curEnv->NewObjectArray( labelsSize, stringArrayClass, NULL); + if (labels_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -3734,8 +3196,7 @@ for ( int i = 0; i < labelsSize; i++) + jstring TempString = curEnv->NewStringUTF( labels[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( labels_, i, TempString); +@@ -3746,11 +3207,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxColumnLabelsjintjobjectArrayID ,id, labels_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(labels_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setMessageBoxDefaultInput (JavaVM * jvm_, int id, char ** values, int valuesSize){ +@@ -3761,9 +3220,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxDefaultInputjintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setMessageBoxDefaultInput", "(I[Ljava/lang/String;)V" ) ; + if (voidsetMessageBoxDefaultInputjintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxDefaultInput" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxDefaultInput"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -3771,8 +3228,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray values_ = curEnv->NewObjectArray( valuesSize, stringArrayClass, NULL); + if (values_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -3781,8 +3237,7 @@ for ( int i = 0; i < valuesSize; i++) + jstring TempString = curEnv->NewStringUTF( values[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( values_, i, TempString); +@@ -3793,11 +3248,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxDefaultInputjintjobjectArrayID ,id, values_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(values_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setMessageBoxModal (JavaVM * jvm_, int id, bool status){ +@@ -3808,19 +3261,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxModaljintjbooleanID = curEnv->GetStaticMethodID(cls, "setMessageBoxModal", "(IZ)V" ) ; + if (voidsetMessageBoxModaljintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxModal" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxModal"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxModaljintjbooleanID ,id, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setMessageBoxIcon (JavaVM * jvm_, int id, char * name){ +@@ -3831,19 +3280,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetMessageBoxIconjintjstringID = curEnv->GetStaticMethodID(cls, "setMessageBoxIcon", "(ILjava/lang/String;)V" ) ; + if (voidsetMessageBoxIconjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setMessageBoxIcon" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setMessageBoxIcon"); + } + + jstring name_ = curEnv->NewStringUTF( name ); + + curEnv->CallStaticVoidMethod(cls, voidsetMessageBoxIconjintjstringID ,id, name_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + bool CallScilabBridge::isToolbarVisible (JavaVM * jvm_, int figNum){ +@@ -3854,17 +3299,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanisToolbarVisiblejintID = curEnv->GetStaticMethodID(cls, "isToolbarVisible", "(I)Z" ) ; + if (jbooleanisToolbarVisiblejintID == NULL) { +-std::cerr << "Could not access to the method " << "isToolbarVisible" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "isToolbarVisible"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanisToolbarVisiblejintID ,figNum); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -3877,19 +3318,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetToolbarVisiblejintjbooleanID = curEnv->GetStaticMethodID(cls, "setToolbarVisible", "(IZ)V" ) ; + if (voidsetToolbarVisiblejintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setToolbarVisible" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setToolbarVisible"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetToolbarVisiblejintjbooleanID ,figNum, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setEventHandler (JavaVM * jvm_, int figNum, char * command){ +@@ -3900,19 +3337,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetEventHandlerjintjstringID = curEnv->GetStaticMethodID(cls, "setEventHandler", "(ILjava/lang/String;)V" ) ; + if (voidsetEventHandlerjintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setEventHandler" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setEventHandler"); + } + + jstring command_ = curEnv->NewStringUTF( command ); + + curEnv->CallStaticVoidMethod(cls, voidsetEventHandlerjintjstringID ,figNum, command_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setEventHandlerEnabled (JavaVM * jvm_, int figNum, bool status){ +@@ -3923,19 +3356,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetEventHandlerEnabledjintjbooleanID = curEnv->GetStaticMethodID(cls, "setEventHandlerEnabled", "(IZ)V" ) ; + if (voidsetEventHandlerEnabledjintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setEventHandlerEnabled" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setEventHandlerEnabled"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetEventHandlerEnabledjintjbooleanID ,figNum, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::newWaitBar (JavaVM * jvm_){ +@@ -3946,17 +3375,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewWaitBarID = curEnv->GetStaticMethodID(cls, "newWaitBar", "()I" ) ; + if (jintnewWaitBarID == NULL) { +-std::cerr << "Could not access to the method " << "newWaitBar" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newWaitBar"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewWaitBarID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -3969,9 +3394,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWaitBarMessagejintjobjectArrayID = curEnv->GetStaticMethodID(cls, "setWaitBarMessage", "(I[Ljava/lang/String;)V" ) ; + if (voidsetWaitBarMessagejintjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setWaitBarMessage" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWaitBarMessage"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -3979,8 +3402,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray message_ = curEnv->NewObjectArray( messageSize, stringArrayClass, NULL); + if (message_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -3989,8 +3411,7 @@ for ( int i = 0; i < messageSize; i++) + jstring TempString = curEnv->NewStringUTF( message[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( message_, i, TempString); +@@ -4001,11 +3422,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->CallStaticVoidMethod(cls, voidsetWaitBarMessagejintjobjectArrayID ,id, message_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(message_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWaitBarValue (JavaVM * jvm_, int id, int value){ +@@ -4016,17 +3435,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWaitBarValuejintjintID = curEnv->GetStaticMethodID(cls, "setWaitBarValue", "(II)V" ) ; + if (voidsetWaitBarValuejintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setWaitBarValue" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWaitBarValue"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetWaitBarValuejintjintID ,id, value); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::destroyWaitBar (JavaVM * jvm_, int objID){ +@@ -4037,17 +3452,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiddestroyWaitBarjintID = curEnv->GetStaticMethodID(cls, "destroyWaitBar", "(I)V" ) ; + if (voiddestroyWaitBarjintID == NULL) { +-std::cerr << "Could not access to the method " << "destroyWaitBar" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "destroyWaitBar"); + } + + curEnv->CallStaticVoidMethod(cls, voiddestroyWaitBarjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWaitBarIndeterminateMode (JavaVM * jvm_, int objID, bool status){ +@@ -4058,19 +3469,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWaitBarIndeterminateModejintjbooleanID = curEnv->GetStaticMethodID(cls, "setWaitBarIndeterminateMode", "(IZ)V" ) ; + if (voidsetWaitBarIndeterminateModejintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setWaitBarIndeterminateMode" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWaitBarIndeterminateMode"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetWaitBarIndeterminateModejintjbooleanID ,objID, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::launchHelpBrowser (JavaVM * jvm_, char ** helps, int helpsSize, char * language){ +@@ -4081,9 +3488,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidlaunchHelpBrowserjobjectArrayjstringID = curEnv->GetStaticMethodID(cls, "launchHelpBrowser", "([Ljava/lang/String;Ljava/lang/String;)V" ) ; + if (voidlaunchHelpBrowserjobjectArrayjstringID == NULL) { +-std::cerr << "Could not access to the method " << "launchHelpBrowser" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "launchHelpBrowser"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -4091,8 +3496,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray helps_ = curEnv->NewObjectArray( helpsSize, stringArrayClass, NULL); + if (helps_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -4101,8 +3505,7 @@ for ( int i = 0; i < helpsSize; i++) + jstring TempString = curEnv->NewStringUTF( helps[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( helps_, i, TempString); +@@ -4115,11 +3518,9 @@ jstring language_ = curEnv->NewStringUTF( language ); + curEnv->CallStaticVoidMethod(cls, voidlaunchHelpBrowserjobjectArrayjstringID ,helps_, language_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(helps_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::searchKeyword (JavaVM * jvm_, char ** helps, int helpsSize, char * keyword, char * language, bool fullText){ +@@ -4130,9 +3531,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsearchKeywordjobjectArrayjstringjstringjbooleanID = curEnv->GetStaticMethodID(cls, "searchKeyword", "([Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V" ) ; + if (voidsearchKeywordjobjectArrayjstringjstringjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "searchKeyword" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "searchKeyword"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -4140,8 +3539,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray helps_ = curEnv->NewObjectArray( helpsSize, stringArrayClass, NULL); + if (helps_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -4150,8 +3548,7 @@ for ( int i = 0; i < helpsSize; i++) + jstring TempString = curEnv->NewStringUTF( helps[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( helps_, i, TempString); +@@ -4168,11 +3565,9 @@ jboolean fullText_ = ((bool) fullText ? JNI_TRUE : JNI_FALSE); + curEnv->CallStaticVoidMethod(cls, voidsearchKeywordjobjectArrayjstringjstringjbooleanID ,helps_, keyword_, language_, fullText_); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(helps_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::saveMainWindowSettings (JavaVM * jvm_){ +@@ -4183,17 +3578,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsaveMainWindowSettingsID = curEnv->GetStaticMethodID(cls, "saveMainWindowSettings", "()V" ) ; + if (voidsaveMainWindowSettingsID == NULL) { +-std::cerr << "Could not access to the method " << "saveMainWindowSettings" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "saveMainWindowSettings"); + } + + curEnv->CallStaticVoidMethod(cls, voidsaveMainWindowSettingsID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::newExportFileChooser (JavaVM * jvm_, int figureId){ +@@ -4204,17 +3595,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewExportFileChooserjintID = curEnv->GetStaticMethodID(cls, "newExportFileChooser", "(I)I" ) ; + if (jintnewExportFileChooserjintID == NULL) { +-std::cerr << "Could not access to the method " << "newExportFileChooser" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newExportFileChooser"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewExportFileChooserjintID ,figureId); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -4227,17 +3614,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewFontChooserID = curEnv->GetStaticMethodID(cls, "newFontChooser", "()I" ) ; + if (jintnewFontChooserID == NULL) { +-std::cerr << "Could not access to the method " << "newFontChooser" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newFontChooser"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewFontChooserID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -4250,17 +3633,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidfontChooserDisplayAndWaitjintID = curEnv->GetStaticMethodID(cls, "fontChooserDisplayAndWait", "(I)V" ) ; + if (voidfontChooserDisplayAndWaitjintID == NULL) { +-std::cerr << "Could not access to the method " << "fontChooserDisplayAndWait" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "fontChooserDisplayAndWait"); + } + + curEnv->CallStaticVoidMethod(cls, voidfontChooserDisplayAndWaitjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFontChooserFontName (JavaVM * jvm_, int objID, char * fontName){ +@@ -4271,19 +3650,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFontChooserFontNamejintjstringID = curEnv->GetStaticMethodID(cls, "setFontChooserFontName", "(ILjava/lang/String;)V" ) ; + if (voidsetFontChooserFontNamejintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setFontChooserFontName" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFontChooserFontName"); + } + + jstring fontName_ = curEnv->NewStringUTF( fontName ); + + curEnv->CallStaticVoidMethod(cls, voidsetFontChooserFontNamejintjstringID ,objID, fontName_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFontChooserFontSize (JavaVM * jvm_, int objID, int fontSize){ +@@ -4294,17 +3669,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFontChooserFontSizejintjintID = curEnv->GetStaticMethodID(cls, "setFontChooserFontSize", "(II)V" ) ; + if (voidsetFontChooserFontSizejintjintID == NULL) { +-std::cerr << "Could not access to the method " << "setFontChooserFontSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFontChooserFontSize"); + } + + curEnv->CallStaticVoidMethod(cls, voidsetFontChooserFontSizejintjintID ,objID, fontSize); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFontChooserBold (JavaVM * jvm_, int objID, bool bold){ +@@ -4315,19 +3686,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFontChooserBoldjintjbooleanID = curEnv->GetStaticMethodID(cls, "setFontChooserBold", "(IZ)V" ) ; + if (voidsetFontChooserBoldjintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setFontChooserBold" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFontChooserBold"); + } + + jboolean bold_ = ((bool) bold ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetFontChooserBoldjintjbooleanID ,objID, bold_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFontChooserItalic (JavaVM * jvm_, int objID, bool italic){ +@@ -4338,19 +3705,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFontChooserItalicjintjbooleanID = curEnv->GetStaticMethodID(cls, "setFontChooserItalic", "(IZ)V" ) ; + if (voidsetFontChooserItalicjintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setFontChooserItalic" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFontChooserItalic"); + } + + jboolean italic_ = ((bool) italic ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetFontChooserItalicjintjbooleanID ,objID, italic_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char * CallScilabBridge::getFontChooserFontName (JavaVM * jvm_, int objID){ +@@ -4361,28 +3724,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetFontChooserFontNamejintID = curEnv->GetStaticMethodID(cls, "getFontChooserFontName", "(I)Ljava/lang/String;" ) ; + if (jstringgetFontChooserFontNamejintID == NULL) { +-std::cerr << "Could not access to the method " << "getFontChooserFontName" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFontChooserFontName"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetFontChooserFontNamejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -4395,17 +3752,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetFontChooserFontSizejintID = curEnv->GetStaticMethodID(cls, "getFontChooserFontSize", "(I)I" ) ; + if (jintgetFontChooserFontSizejintID == NULL) { +-std::cerr << "Could not access to the method " << "getFontChooserFontSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFontChooserFontSize"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetFontChooserFontSizejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -4418,17 +3771,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleangetFontChooserBoldjintID = curEnv->GetStaticMethodID(cls, "getFontChooserBold", "(I)Z" ) ; + if (jbooleangetFontChooserBoldjintID == NULL) { +-std::cerr << "Could not access to the method " << "getFontChooserBold" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFontChooserBold"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleangetFontChooserBoldjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -4441,17 +3790,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleangetFontChooserItalicjintID = curEnv->GetStaticMethodID(cls, "getFontChooserItalic", "(I)Z" ) ; + if (jbooleangetFontChooserItalicjintID == NULL) { +-std::cerr << "Could not access to the method " << "getFontChooserItalic" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFontChooserItalic"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleangetFontChooserItalicjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -4464,17 +3809,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintnewColorChooserID = curEnv->GetStaticMethodID(cls, "newColorChooser", "()I" ) ; + if (jintnewColorChooserID == NULL) { +-std::cerr << "Could not access to the method " << "newColorChooser" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "newColorChooser"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintnewColorChooserID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -4487,17 +3828,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidcolorChooserDisplayAndWaitjintID = curEnv->GetStaticMethodID(cls, "colorChooserDisplayAndWait", "(I)V" ) ; + if (voidcolorChooserDisplayAndWaitjintID == NULL) { +-std::cerr << "Could not access to the method " << "colorChooserDisplayAndWait" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "colorChooserDisplayAndWait"); + } + + curEnv->CallStaticVoidMethod(cls, voidcolorChooserDisplayAndWaitjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setColorChooserDefaultColor (JavaVM * jvm_, int objID, int * rgb, int rgbSize){ +@@ -4508,23 +3845,25 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetColorChooserDefaultColorjintjintArrayID = curEnv->GetStaticMethodID(cls, "setColorChooserDefaultColor", "(I[I)V" ) ; + if (voidsetColorChooserDefaultColorjintjintArrayID == NULL) { +-std::cerr << "Could not access to the method " << "setColorChooserDefaultColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setColorChooserDefaultColor"); + } + + jintArray rgb_ = curEnv->NewIntArray( rgbSize ) ; + ++if (rgb_ == NULL) ++{ ++// check that allocation succeed ++throw GiwsException::JniBadAllocException(curEnv); ++} ++ + curEnv->SetIntArrayRegion( rgb_, 0, rgbSize, (jint*) rgb ) ; + + + curEnv->CallStaticVoidMethod(cls, voidsetColorChooserDefaultColorjintjintArrayID ,objID, rgb_); + curEnv->DeleteLocalRef(rgb_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int * CallScilabBridge::getColorChooserSelectedColor (JavaVM * jvm_, int objID){ +@@ -4535,9 +3874,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintArraygetColorChooserSelectedColorjintID = curEnv->GetStaticMethodID(cls, "getColorChooserSelectedColor", "(I)[I" ) ; + if (jintArraygetColorChooserSelectedColorjintID == NULL) { +-std::cerr << "Could not access to the method " << "getColorChooserSelectedColor" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getColorChooserSelectedColor"); + } + + jintArray res = (jintArray) curEnv->CallObjectMethod(cls, jintArraygetColorChooserSelectedColorjintID ,objID); +@@ -4555,11 +3892,9 @@ myArray[i]=resultsArray[i]; + curEnv->ReleasePrimitiveArrayCritical(res, resultsArray, JNI_ABORT); + + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myArray; + + } +@@ -4572,19 +3907,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetColorChooserTitlejintjstringID = curEnv->GetStaticMethodID(cls, "setColorChooserTitle", "(ILjava/lang/String;)V" ) ; + if (voidsetColorChooserTitlejintjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setColorChooserTitle" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setColorChooserTitle"); + } + + jstring title_ = curEnv->NewStringUTF( title ); + + curEnv->CallStaticVoidMethod(cls, voidsetColorChooserTitlejintjstringID ,objID, title_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setWidgetVisible (JavaVM * jvm_, int objID, bool status){ +@@ -4595,19 +3926,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetWidgetVisiblejintjbooleanID = curEnv->GetStaticMethodID(cls, "setWidgetVisible", "(IZ)V" ) ; + if (voidsetWidgetVisiblejintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setWidgetVisible" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setWidgetVisible"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetWidgetVisiblejintjbooleanID ,objID, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setFrameVisible (JavaVM * jvm_, int objID, bool status){ +@@ -4618,19 +3945,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetFrameVisiblejintjbooleanID = curEnv->GetStaticMethodID(cls, "setFrameVisible", "(IZ)V" ) ; + if (voidsetFrameVisiblejintjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "setFrameVisible" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setFrameVisible"); + } + + jboolean status_ = ((bool) status ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voidsetFrameVisiblejintjbooleanID ,objID, status_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + bool CallScilabBridge::isWidgetVisible (JavaVM * jvm_, int objID){ +@@ -4641,17 +3964,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanisWidgetVisiblejintID = curEnv->GetStaticMethodID(cls, "isWidgetVisible", "(I)Z" ) ; + if (jbooleanisWidgetVisiblejintID == NULL) { +-std::cerr << "Could not access to the method " << "isWidgetVisible" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "isWidgetVisible"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanisWidgetVisiblejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -4664,17 +3983,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanisFrameVisiblejintID = curEnv->GetStaticMethodID(cls, "isFrameVisible", "(I)Z" ) ; + if (jbooleanisFrameVisiblejintID == NULL) { +-std::cerr << "Could not access to the method " << "isFrameVisible" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "isFrameVisible"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanisFrameVisiblejintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -4687,28 +4002,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetClipboardContentsID = curEnv->GetStaticMethodID(cls, "getClipboardContents", "()Ljava/lang/String;" ) ; + if (jstringgetClipboardContentsID == NULL) { +-std::cerr << "Could not access to the method " << "getClipboardContents" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getClipboardContents"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetClipboardContentsID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -4721,17 +4030,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidpasteClipboardIntoConsoleID = curEnv->GetStaticMethodID(cls, "pasteClipboardIntoConsole", "()V" ) ; + if (voidpasteClipboardIntoConsoleID == NULL) { +-std::cerr << "Could not access to the method " << "pasteClipboardIntoConsole" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "pasteClipboardIntoConsole"); + } + + curEnv->CallStaticVoidMethod(cls, voidpasteClipboardIntoConsoleID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::copyConsoleSelection (JavaVM * jvm_){ +@@ -4742,17 +4047,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidcopyConsoleSelectionID = curEnv->GetStaticMethodID(cls, "copyConsoleSelection", "()V" ) ; + if (voidcopyConsoleSelectionID == NULL) { +-std::cerr << "Could not access to the method " << "copyConsoleSelection" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "copyConsoleSelection"); + } + + curEnv->CallStaticVoidMethod(cls, voidcopyConsoleSelectionID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::emptyClipboard (JavaVM * jvm_){ +@@ -4763,17 +4064,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidemptyClipboardID = curEnv->GetStaticMethodID(cls, "emptyClipboard", "()V" ) ; + if (voidemptyClipboardID == NULL) { +-std::cerr << "Could not access to the method " << "emptyClipboard" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "emptyClipboard"); + } + + curEnv->CallStaticVoidMethod(cls, voidemptyClipboardID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::setClipboardContents (JavaVM * jvm_, char * text){ +@@ -4784,19 +4081,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidsetClipboardContentsjstringID = curEnv->GetStaticMethodID(cls, "setClipboardContents", "(Ljava/lang/String;)V" ) ; + if (voidsetClipboardContentsjstringID == NULL) { +-std::cerr << "Could not access to the method " << "setClipboardContents" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "setClipboardContents"); + } + + jstring text_ = curEnv->NewStringUTF( text ); + + curEnv->CallStaticVoidMethod(cls, voidsetClipboardContentsjstringID ,text_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::copyFigureToClipBoard (JavaVM * jvm_, int figID){ +@@ -4807,17 +4100,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidcopyFigureToClipBoardjintID = curEnv->GetStaticMethodID(cls, "copyFigureToClipBoard", "(I)V" ) ; + if (voidcopyFigureToClipBoardjintID == NULL) { +-std::cerr << "Could not access to the method " << "copyFigureToClipBoard" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "copyFigureToClipBoard"); + } + + curEnv->CallStaticVoidMethod(cls, voidcopyFigureToClipBoardjintID ,figID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + int CallScilabBridge::getScreenResolution (JavaVM * jvm_){ +@@ -4828,17 +4117,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetScreenResolutionID = curEnv->GetStaticMethodID(cls, "getScreenResolution", "()I" ) ; + if (jintgetScreenResolutionID == NULL) { +-std::cerr << "Could not access to the method " << "getScreenResolution" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getScreenResolution"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetScreenResolutionID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -4851,17 +4136,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jdoublegetScreenWidthID = curEnv->GetStaticMethodID(cls, "getScreenWidth", "()D" ) ; + if (jdoublegetScreenWidthID == NULL) { +-std::cerr << "Could not access to the method " << "getScreenWidth" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getScreenWidth"); + } + + jdouble res = (jdouble) curEnv->CallStaticDoubleMethod(cls, jdoublegetScreenWidthID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -4874,17 +4155,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jdoublegetScreenHeightID = curEnv->GetStaticMethodID(cls, "getScreenHeight", "()D" ) ; + if (jdoublegetScreenHeightID == NULL) { +-std::cerr << "Could not access to the method " << "getScreenHeight" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getScreenHeight"); + } + + jdouble res = (jdouble) curEnv->CallStaticDoubleMethod(cls, jdoublegetScreenHeightID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -4897,17 +4174,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetScreenDepthID = curEnv->GetStaticMethodID(cls, "getScreenDepth", "()I" ) ; + if (jintgetScreenDepthID == NULL) { +-std::cerr << "Could not access to the method " << "getScreenDepth" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getScreenDepth"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetScreenDepthID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -4920,9 +4193,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanprintFigurejintjbooleanjbooleanID = curEnv->GetStaticMethodID(cls, "printFigure", "(IZZ)Z" ) ; + if (jbooleanprintFigurejintjbooleanjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "printFigure" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "printFigure"); + } + + jboolean postScript_ = ((bool) postScript ? JNI_TRUE : JNI_FALSE); +@@ -4930,11 +4201,9 @@ jboolean postScript_ = ((bool) postScript ? JNI_TRUE : JNI_FALSE); + jboolean displayDialog_ = ((bool) displayDialog ? JNI_TRUE : JNI_FALSE); + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanprintFigurejintjbooleanjbooleanID ,figID, postScript_, displayDialog_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -4947,19 +4216,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanprintFilejstringID = curEnv->GetStaticMethodID(cls, "printFile", "(Ljava/lang/String;)Z" ) ; + if (jbooleanprintFilejstringID == NULL) { +-std::cerr << "Could not access to the method " << "printFile" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "printFile"); + } + + jstring fileName_ = curEnv->NewStringUTF( fileName ); + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanprintFilejstringID ,fileName_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -4972,9 +4237,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanprintStringjstringjstringID = curEnv->GetStaticMethodID(cls, "printString", "(Ljava/lang/String;Ljava/lang/String;)Z" ) ; + if (jbooleanprintStringjstringjstringID == NULL) { +-std::cerr << "Could not access to the method " << "printString" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "printString"); + } + + jstring theString_ = curEnv->NewStringUTF( theString ); +@@ -4982,11 +4245,9 @@ jstring theString_ = curEnv->NewStringUTF( theString ); + jstring pageHeader_ = curEnv->NewStringUTF( pageHeader ); + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanprintStringjstringjstringID ,theString_, pageHeader_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -4999,17 +4260,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanpageSetupID = curEnv->GetStaticMethodID(cls, "pageSetup", "()Z" ) ; + if (jbooleanpageSetupID == NULL) { +-std::cerr << "Could not access to the method " << "pageSetup" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "pageSetup"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanpageSetupID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -5022,17 +4279,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidrequestWidgetFocusjintID = curEnv->GetStaticMethodID(cls, "requestWidgetFocus", "(I)V" ) ; + if (voidrequestWidgetFocusjintID == NULL) { +-std::cerr << "Could not access to the method " << "requestWidgetFocus" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "requestWidgetFocus"); + } + + curEnv->CallStaticVoidMethod(cls, voidrequestWidgetFocusjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::requestFrameFocus (JavaVM * jvm_, int objID){ +@@ -5043,17 +4296,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidrequestFrameFocusjintID = curEnv->GetStaticMethodID(cls, "requestFrameFocus", "(I)V" ) ; + if (voidrequestFrameFocusjintID == NULL) { +-std::cerr << "Could not access to the method " << "requestFrameFocus" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "requestFrameFocus"); + } + + curEnv->CallStaticVoidMethod(cls, voidrequestFrameFocusjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::raiseWindow (JavaVM * jvm_, int objID){ +@@ -5064,17 +4313,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voidraiseWindowjintID = curEnv->GetStaticMethodID(cls, "raiseWindow", "(I)V" ) ; + if (voidraiseWindowjintID == NULL) { +-std::cerr << "Could not access to the method " << "raiseWindow" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "raiseWindow"); + } + + curEnv->CallStaticVoidMethod(cls, voidraiseWindowjintID ,objID); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void CallScilabBridge::useCanvasForDisplay (JavaVM * jvm_, bool onOrOff){ +@@ -5085,19 +4330,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduseCanvasForDisplayjbooleanID = curEnv->GetStaticMethodID(cls, "useCanvasForDisplay", "(Z)V" ) ; + if (voiduseCanvasForDisplayjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "useCanvasForDisplay" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "useCanvasForDisplay"); + } + + jboolean onOrOff_ = ((bool) onOrOff ? JNI_TRUE : JNI_FALSE); + + curEnv->CallStaticVoidMethod(cls, voiduseCanvasForDisplayjbooleanID ,onOrOff_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + bool CallScilabBridge::useCanvasForDisplay (JavaVM * jvm_){ +@@ -5108,17 +4349,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanuseCanvasForDisplayID = curEnv->GetStaticMethodID(cls, "useCanvasForDisplay", "()Z" ) ; + if (jbooleanuseCanvasForDisplayID == NULL) { +-std::cerr << "Could not access to the method " << "useCanvasForDisplay" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "useCanvasForDisplay"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanuseCanvasForDisplayID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +diff --git a/scilab/modules/gui/src/jni/CallScilabBridge.hxx b/scilab/modules/gui/src/jni/CallScilabBridge.hxx +index 0c84828..43a4746 100644 +--- a/scilab/modules/gui/src/jni/CallScilabBridge.hxx ++++ b/scilab/modules/gui/src/jni/CallScilabBridge.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -44,6 +44,8 @@ knowledge of the CeCILL-B license and that you accept its terms. + #include + #include + ++#include "GiwsException.hxx" ++ + namespace org_scilab_modules_gui_bridge { + + class CallScilabBridge { +diff --git a/scilab/modules/gui/src/jni/GiwsException.cpp b/scilab/modules/gui/src/jni/GiwsException.cpp +index fc4d53c..234e52b 100644 +--- a/scilab/modules/gui/src/jni/GiwsException.cpp ++++ b/scilab/modules/gui/src/jni/GiwsException.cpp +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -47,7 +47,7 @@ namespace GiwsException { + */ + JniException::JniException(JNIEnv * curEnv) throw() : exception() + { +-// retrieve informations about the exception ++// retrieve information about the exception + javaException = curEnv->ExceptionOccurred(); + /* Clear the Java Exception to avoid calling it again & again */ + curEnv->ExceptionClear(); +@@ -122,7 +122,7 @@ std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv) + { + // return the result of the getLocalizedMessage method + +-// retrieve informations from the exception. ++// retrieve information from the exception. + // get method id + jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), + "getLocalizedMessage", +@@ -153,7 +153,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + // return the result of the getStackTrace method + +- // retrieve informations from the exception. ++ // retrieve information from the exception. + // get method id + // getStackTrace returns an array of StackTraceElement + jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), +@@ -242,9 +242,9 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + } + + /** +- * To be called when all the informations about the exceptions have been ++ * To be called when all the information about the exceptions have been + * retrived. +- * Remove the exception from the environement. ++ * Remove the exception from the environment. + */ + void JniException::closeException(JNIEnv * curEnv) + { +@@ -293,7 +293,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + */ + + /** +- * @pram curEnv java environment where the exception occured. ++ * @param curEnv java environment where the exception occured. + */ + JniCallMethodException::JniCallMethodException(JNIEnv * curEnv) throw() : JniException(curEnv) + { +@@ -305,7 +305,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + JniCallMethodException::~JniCallMethodException(void) throw() {} + /** +- * @pram className name of the class which haven't been found ++ * @param className name of the class which haven't been found + */ + JniClassNotFoundException::JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -316,7 +316,7 @@ setErrorMessage(errorMessage); + JniClassNotFoundException::~JniClassNotFoundException(void) throw() {} + + /** +- * @pram className name of the method which haven't been found ++ * @param className name of the method which haven't been found + */ + JniMethodNotFoundException::JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw() : JniException(curEnv) + { +@@ -325,8 +325,9 @@ setErrorMessage(errorMessage); + } + + JniMethodNotFoundException::~JniMethodNotFoundException(void) throw() {} ++ + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException::JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -336,6 +337,17 @@ setErrorMessage(errorMessage); + + JniObjectCreationException::~JniObjectCreationException(void) throw() {} + ++ /** ++ * @param curEnv java envirnonment where the exception occured. ++ */ ++ JniMonitorException::JniMonitorException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) ++ { ++std::string errorMessage = "Error in the access (Enter or exit) or a Java env monitor of class " + className + "."; ++setErrorMessage(errorMessage); ++ } ++ ++ JniMonitorException::~JniMonitorException(void) throw() {} ++ + + + } +diff --git a/scilab/modules/gui/src/jni/GiwsException.hxx b/scilab/modules/gui/src/jni/GiwsException.hxx +index a2be211..73f8175 100644 +--- a/scilab/modules/gui/src/jni/GiwsException.hxx ++++ b/scilab/modules/gui/src/jni/GiwsException.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -129,9 +129,9 @@ std::string retrieveStackTrace(JNIEnv * curEnv); + */ + std::string retrieveExceptionName(JNIEnv * curEnv); + /** +-* To be called when all the informations about the exceptions have been ++* To be called when all the information about the exceptions have been + * retrived. +-* Remove the exception from the environement. ++* Remove the exception from the environment. + */ + void closeException(JNIEnv * curEnv); + +@@ -164,7 +164,7 @@ class JniCallMethodException : public JniException + public: + + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniCallMethodException(JNIEnv * curEnv) throw(); + +@@ -179,7 +179,7 @@ class JniClassNotFoundException : public JniException + public: + + /** +-* @pram className name of the class which haven't been found ++* @param className name of the class which haven't been found + */ + JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw(); + +@@ -195,7 +195,7 @@ class JniMethodNotFoundException : public JniException + public: + + /** +-* @pram className name of the method which haven't been found ++* @param className name of the method which haven't been found + */ + JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw(); + virtual ~JniMethodNotFoundException(void) throw(); +@@ -213,7 +213,7 @@ class JniObjectCreationException : public JniException + public: + + /** +-* @pram curEnv java envirnonment where the exception occured. ++* @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw(); + virtual ~JniObjectCreationException(void) throw(); +@@ -221,6 +221,23 @@ virtual ~JniObjectCreationException(void) throw(); + }; + + ++/** ++* Exception that should be thrown when a call to the Java monitor ++* failed ++*/ ++class JniMonitorException : public JniException ++{ ++public: ++ ++/** ++* @param curEnv java envirnonment where the exception occured. ++*/ ++JniMonitorException(JNIEnv * curEnv, const std::string & className) throw(); ++virtual ~JniMonitorException(void) throw(); ++ ++}; ++ ++ + } + #endif + +diff --git a/scilab/modules/gui/src/jni/Juigetfile.cpp b/scilab/modules/gui/src/jni/Juigetfile.cpp +index 27f005f..5f78ac1 100644 +--- a/scilab/modules/gui/src/jni/Juigetfile.cpp ++++ b/scilab/modules/gui/src/jni/Juigetfile.cpp +@@ -1,5 +1,5 @@ + #include "Juigetfile.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -68,9 +68,7 @@ JNIEnv * curEnv = getCurrentEnv(); + + localClass = curEnv->FindClass( this->className().c_str() ) ; + if (localClass == NULL) { +-std::cerr << "Could not get the Class " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++ throw GiwsException::JniClassNotFoundException(curEnv, this->className()); + } + + this->instanceClass = (jclass) curEnv->NewGlobalRef(localClass) ; +@@ -79,31 +77,23 @@ this->instanceClass = (jclass) curEnv->NewGlobalRef(localClass) ; + curEnv->DeleteLocalRef(localClass); + + if (this->instanceClass == NULL) { +-std::cerr << "Could not create a Global Ref of " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + + constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ; + if(constructObject == NULL){ +-std::cerr << "Could not retrieve the constructor of the class " << this->className() << " with the profile : " << construct << param << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ; + if(localInstance == NULL){ +-std::cerr << "Could not instantiate the object " << this->className() << " with the constructor : " << construct << param << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + this->instance = curEnv->NewGlobalRef(localInstance) ; + if(this->instance == NULL){ +-std::cerr << "Could not create a new global ref of " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + /* localInstance not needed anymore */ + curEnv->DeleteLocalRef(localInstance); +@@ -142,18 +132,12 @@ jclass localClass = curEnv->GetObjectClass(JObj); + curEnv->DeleteLocalRef(localClass); + + if (this->instanceClass == NULL) { +- +-std::cerr << "Could not create a Global Ref of " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + + this->instance = curEnv->NewGlobalRef(JObj) ; + if(this->instance == NULL){ +- +-std::cerr << "Could not create a new global ref of " << this->className() << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniObjectCreationException(curEnv, this->className()); + } + /* Methods ID set to NULL */ + voiduigetfileID=NULL; +@@ -181,22 +165,17 @@ voiduigetdirjstringjstringID=NULL; + + // Generic methods + +- + void Juigetfile::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "Juigetfile"); + } + } + +- + void Juigetfile::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "Juigetfile"); + } + } +- + // Method(s) + + void Juigetfile::uigetfile (JavaVM * jvm_){ +@@ -207,17 +186,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduigetfileID = curEnv->GetStaticMethodID(cls, "uigetfile", "()V" ) ; + if (voiduigetfileID == NULL) { +-std::cerr << "Could not access to the method " << "uigetfile" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "uigetfile"); + } + + curEnv->CallStaticVoidMethod(cls, voiduigetfileID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void Juigetfile::uigetfile (JavaVM * jvm_, char ** mask, int maskSize, char ** description, int descriptionSize){ +@@ -228,9 +203,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduigetfilejobjectArrayjobjectArrayID = curEnv->GetStaticMethodID(cls, "uigetfile", "([Ljava/lang/String;[Ljava/lang/String;)V" ) ; + if (voiduigetfilejobjectArrayjobjectArrayID == NULL) { +-std::cerr << "Could not access to the method " << "uigetfile" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "uigetfile"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -238,8 +211,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray mask_ = curEnv->NewObjectArray( maskSize, stringArrayClass, NULL); + if (mask_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -248,8 +220,7 @@ for ( int i = 0; i < maskSize; i++) + jstring TempString = curEnv->NewStringUTF( mask[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( mask_, i, TempString); +@@ -262,8 +233,7 @@ curEnv->DeleteLocalRef(TempString); + jobjectArray description_ = curEnv->NewObjectArray( descriptionSize, stringArrayClass, NULL); + if (description_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -272,8 +242,7 @@ for ( int i = 0; i < descriptionSize; i++) + jstring TempString = curEnv->NewStringUTF( description[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( description_, i, TempString); +@@ -285,11 +254,9 @@ curEnv->DeleteLocalRef(TempString); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(mask_); + curEnv->DeleteLocalRef(description_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void Juigetfile::uigetfile (JavaVM * jvm_, char ** mask, int maskSize, char ** description, int descriptionSize, char * initialDirectory){ +@@ -300,9 +267,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduigetfilejobjectArrayjobjectArrayjstringID = curEnv->GetStaticMethodID(cls, "uigetfile", "([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V" ) ; + if (voiduigetfilejobjectArrayjobjectArrayjstringID == NULL) { +-std::cerr << "Could not access to the method " << "uigetfile" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "uigetfile"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -310,8 +275,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray mask_ = curEnv->NewObjectArray( maskSize, stringArrayClass, NULL); + if (mask_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -320,8 +284,7 @@ for ( int i = 0; i < maskSize; i++) + jstring TempString = curEnv->NewStringUTF( mask[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( mask_, i, TempString); +@@ -334,8 +297,7 @@ curEnv->DeleteLocalRef(TempString); + jobjectArray description_ = curEnv->NewObjectArray( descriptionSize, stringArrayClass, NULL); + if (description_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -344,8 +306,7 @@ for ( int i = 0; i < descriptionSize; i++) + jstring TempString = curEnv->NewStringUTF( description[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( description_, i, TempString); +@@ -359,11 +320,9 @@ jstring initialDirectory_ = curEnv->NewStringUTF( initialDirectory ); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(mask_); + curEnv->DeleteLocalRef(description_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void Juigetfile::uigetfile (JavaVM * jvm_, char ** mask, int maskSize, char ** description, int descriptionSize, char * initialDirectory, char * boxtTitle){ +@@ -374,9 +333,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduigetfilejobjectArrayjobjectArrayjstringjstringID = curEnv->GetStaticMethodID(cls, "uigetfile", "([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" ) ; + if (voiduigetfilejobjectArrayjobjectArrayjstringjstringID == NULL) { +-std::cerr << "Could not access to the method " << "uigetfile" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "uigetfile"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -384,8 +341,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray mask_ = curEnv->NewObjectArray( maskSize, stringArrayClass, NULL); + if (mask_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -394,8 +350,7 @@ for ( int i = 0; i < maskSize; i++) + jstring TempString = curEnv->NewStringUTF( mask[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( mask_, i, TempString); +@@ -408,8 +363,7 @@ curEnv->DeleteLocalRef(TempString); + jobjectArray description_ = curEnv->NewObjectArray( descriptionSize, stringArrayClass, NULL); + if (description_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -418,8 +372,7 @@ for ( int i = 0; i < descriptionSize; i++) + jstring TempString = curEnv->NewStringUTF( description[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( description_, i, TempString); +@@ -435,11 +388,9 @@ jstring boxtTitle_ = curEnv->NewStringUTF( boxtTitle ); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(mask_); + curEnv->DeleteLocalRef(description_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void Juigetfile::uigetfile (JavaVM * jvm_, char ** mask, int maskSize, char ** description, int descriptionSize, char * initialDirectory, char * boxtTitle, bool multipleSelection){ +@@ -450,9 +401,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduigetfilejobjectArrayjobjectArrayjstringjstringjbooleanID = curEnv->GetStaticMethodID(cls, "uigetfile", "([Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V" ) ; + if (voiduigetfilejobjectArrayjobjectArrayjstringjstringjbooleanID == NULL) { +-std::cerr << "Could not access to the method " << "uigetfile" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "uigetfile"); + } + jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + +@@ -460,8 +409,7 @@ jclass stringArrayClass = curEnv->FindClass("java/lang/String"); + jobjectArray mask_ = curEnv->NewObjectArray( maskSize, stringArrayClass, NULL); + if (mask_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -470,8 +418,7 @@ for ( int i = 0; i < maskSize; i++) + jstring TempString = curEnv->NewStringUTF( mask[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( mask_, i, TempString); +@@ -484,8 +431,7 @@ curEnv->DeleteLocalRef(TempString); + jobjectArray description_ = curEnv->NewObjectArray( descriptionSize, stringArrayClass, NULL); + if (description_ == NULL) + { +-std::cerr << "Could not allocate Java string array, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + // convert each char * to java strings and fill the java array. +@@ -494,8 +440,7 @@ for ( int i = 0; i < descriptionSize; i++) + jstring TempString = curEnv->NewStringUTF( description[i] ); + if (TempString == NULL) + { +-std::cerr << "Could not convert C string to Java UTF string, memory full." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniBadAllocException(curEnv); + } + + curEnv->SetObjectArrayElement( description_, i, TempString); +@@ -513,11 +458,9 @@ jboolean multipleSelection_ = ((bool) multipleSelection ? JNI_TRUE : JNI_FALSE); + curEnv->DeleteLocalRef(stringArrayClass); + curEnv->DeleteLocalRef(mask_); + curEnv->DeleteLocalRef(description_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + char * Juigetfile::getTitleBox (JavaVM * jvm_){ +@@ -528,28 +471,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetTitleBoxID = curEnv->GetStaticMethodID(cls, "getTitleBox", "()Ljava/lang/String;" ) ; + if (jstringgetTitleBoxID == NULL) { +-std::cerr << "Could not access to the method " << "getTitleBox" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getTitleBox"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetTitleBoxID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -562,17 +499,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jobjectArraygetMaskID = curEnv->GetStaticMethodID(cls, "getMask", "()[Ljava/lang/String;" ) ; + if (jobjectArraygetMaskID == NULL) { +-std::cerr << "Could not access to the method " << "getMask" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getMask"); + } + + jobjectArray res = (jobjectArray) curEnv->CallObjectMethod(cls, jobjectArraygetMaskID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + jsize len = curEnv->GetArrayLength(res); + char **arrayOfString; + arrayOfString= arrayOfString= new char *[len + 1]; +@@ -585,11 +518,9 @@ strcpy(arrayOfString[i], tempString); + curEnv->ReleaseStringUTFChars(resString, tempString); + curEnv->DeleteLocalRef(resString); + } +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + curEnv->DeleteLocalRef(res); + return arrayOfString; + +@@ -603,17 +534,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jobjectArraygetMaskDescriptionID = curEnv->GetStaticMethodID(cls, "getMaskDescription", "()[Ljava/lang/String;" ) ; + if (jobjectArraygetMaskDescriptionID == NULL) { +-std::cerr << "Could not access to the method " << "getMaskDescription" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getMaskDescription"); + } + + jobjectArray res = (jobjectArray) curEnv->CallObjectMethod(cls, jobjectArraygetMaskDescriptionID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + jsize len = curEnv->GetArrayLength(res); + char **arrayOfString; + arrayOfString= arrayOfString= new char *[len + 1]; +@@ -626,11 +553,9 @@ strcpy(arrayOfString[i], tempString); + curEnv->ReleaseStringUTFChars(resString, tempString); + curEnv->DeleteLocalRef(resString); + } +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + curEnv->DeleteLocalRef(res); + return arrayOfString; + +@@ -644,28 +569,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetInitialDirectoryID = curEnv->GetStaticMethodID(cls, "getInitialDirectory", "()Ljava/lang/String;" ) ; + if (jstringgetInitialDirectoryID == NULL) { +-std::cerr << "Could not access to the method " << "getInitialDirectory" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getInitialDirectory"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetInitialDirectoryID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -678,17 +597,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetSelectionSizeID = curEnv->GetStaticMethodID(cls, "getSelectionSize", "()I" ) ; + if (jintgetSelectionSizeID == NULL) { +-std::cerr << "Could not access to the method " << "getSelectionSize" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getSelectionSize"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetSelectionSizeID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -701,17 +616,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jobjectArraygetSelectionID = curEnv->GetStaticMethodID(cls, "getSelection", "()[Ljava/lang/String;" ) ; + if (jobjectArraygetSelectionID == NULL) { +-std::cerr << "Could not access to the method " << "getSelection" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getSelection"); + } + + jobjectArray res = (jobjectArray) curEnv->CallObjectMethod(cls, jobjectArraygetSelectionID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + jsize len = curEnv->GetArrayLength(res); + char **arrayOfString; + arrayOfString= arrayOfString= new char *[len + 1]; +@@ -724,11 +635,9 @@ strcpy(arrayOfString[i], tempString); + curEnv->ReleaseStringUTFChars(resString, tempString); + curEnv->DeleteLocalRef(resString); + } +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + curEnv->DeleteLocalRef(res); + return arrayOfString; + +@@ -742,17 +651,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jobjectArraygetSelectionFileNamesID = curEnv->GetStaticMethodID(cls, "getSelectionFileNames", "()[Ljava/lang/String;" ) ; + if (jobjectArraygetSelectionFileNamesID == NULL) { +-std::cerr << "Could not access to the method " << "getSelectionFileNames" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getSelectionFileNames"); + } + + jobjectArray res = (jobjectArray) curEnv->CallObjectMethod(cls, jobjectArraygetSelectionFileNamesID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + jsize len = curEnv->GetArrayLength(res); + char **arrayOfString; + arrayOfString= arrayOfString= new char *[len + 1]; +@@ -765,11 +670,9 @@ strcpy(arrayOfString[i], tempString); + curEnv->ReleaseStringUTFChars(resString, tempString); + curEnv->DeleteLocalRef(resString); + } +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + curEnv->DeleteLocalRef(res); + return arrayOfString; + +@@ -783,17 +686,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jbooleanisMultipleSelectionID = curEnv->GetStaticMethodID(cls, "isMultipleSelection", "()Z" ) ; + if (jbooleanisMultipleSelectionID == NULL) { +-std::cerr << "Could not access to the method " << "isMultipleSelection" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "isMultipleSelection"); + } + + jboolean res = (jboolean) curEnv->CallStaticBooleanMethod(cls, jbooleanisMultipleSelectionID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return (res == JNI_TRUE); + + } +@@ -806,28 +705,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetSelectionPathNameID = curEnv->GetStaticMethodID(cls, "getSelectionPathName", "()Ljava/lang/String;" ) ; + if (jstringgetSelectionPathNameID == NULL) { +-std::cerr << "Could not access to the method " << "getSelectionPathName" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getSelectionPathName"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetSelectionPathNameID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -840,17 +733,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jintgetFilterIndexID = curEnv->GetStaticMethodID(cls, "getFilterIndex", "()I" ) ; + if (jintgetFilterIndexID == NULL) { +-std::cerr << "Could not access to the method " << "getFilterIndex" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getFilterIndex"); + } + + jint res = (jint) curEnv->CallIntMethod(cls, jintgetFilterIndexID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return res; + + } +@@ -863,28 +752,22 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID jstringgetMenuCallbackID = curEnv->GetStaticMethodID(cls, "getMenuCallback", "()Ljava/lang/String;" ) ; + if (jstringgetMenuCallbackID == NULL) { +-std::cerr << "Could not access to the method " << "getMenuCallback" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "getMenuCallback"); + } + + jstring res = (jstring) curEnv->CallStaticObjectMethod(cls, jstringgetMenuCallbackID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } + +- + const char *tempString = curEnv->GetStringUTFChars(res, 0); + char * myStringBuffer = new char[strlen(tempString) + 1]; + strcpy(myStringBuffer, tempString); + curEnv->ReleaseStringUTFChars(res, tempString); + curEnv->DeleteLocalRef(res); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + return myStringBuffer; + + } +@@ -897,17 +780,13 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduigetdirID = curEnv->GetStaticMethodID(cls, "uigetdir", "()V" ) ; + if (voiduigetdirID == NULL) { +-std::cerr << "Could not access to the method " << "uigetdir" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "uigetdir"); + } + + curEnv->CallStaticVoidMethod(cls, voiduigetdirID ); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void Juigetfile::uigetdir (JavaVM * jvm_, char * initialDirectory){ +@@ -918,19 +797,15 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduigetdirjstringID = curEnv->GetStaticMethodID(cls, "uigetdir", "(Ljava/lang/String;)V" ) ; + if (voiduigetdirjstringID == NULL) { +-std::cerr << "Could not access to the method " << "uigetdir" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "uigetdir"); + } + + jstring initialDirectory_ = curEnv->NewStringUTF( initialDirectory ); + + curEnv->CallStaticVoidMethod(cls, voiduigetdirjstringID ,initialDirectory_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + void Juigetfile::uigetdir (JavaVM * jvm_, char * initialDirectory, char * title){ +@@ -941,9 +816,7 @@ jclass cls = curEnv->FindClass( className().c_str() ); + + jmethodID voiduigetdirjstringjstringID = curEnv->GetStaticMethodID(cls, "uigetdir", "(Ljava/lang/String;Ljava/lang/String;)V" ) ; + if (voiduigetdirjstringjstringID == NULL) { +-std::cerr << "Could not access to the method " << "uigetdir" << std::endl; +-curEnv->ExceptionDescribe(); +-exit(EXIT_FAILURE); ++throw GiwsException::JniMethodNotFoundException(curEnv, "uigetdir"); + } + + jstring initialDirectory_ = curEnv->NewStringUTF( initialDirectory ); +@@ -951,11 +824,9 @@ jstring initialDirectory_ = curEnv->NewStringUTF( initialDirectory ); + jstring title_ = curEnv->NewStringUTF( title ); + + curEnv->CallStaticVoidMethod(cls, voiduigetdirjstringjstringID ,initialDirectory_, title_); +- + if (curEnv->ExceptionCheck()) { +-curEnv->ExceptionDescribe() ; ++throw GiwsException::JniCallMethodException(curEnv); + } +- + } + + } +diff --git a/scilab/modules/gui/src/jni/Juigetfile.hxx b/scilab/modules/gui/src/jni/Juigetfile.hxx +index 09e20d4..13e47af 100644 +--- a/scilab/modules/gui/src/jni/Juigetfile.hxx ++++ b/scilab/modules/gui/src/jni/Juigetfile.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -44,6 +44,8 @@ knowledge of the CeCILL-B license and that you accept its terms. + #include + #include + ++#include "GiwsException.hxx" ++ + namespace org_scilab_modules_gui_filechooser { + + class Juigetfile { +diff --git a/scilab/modules/gui/src/jni/Jxclick.cpp b/scilab/modules/gui/src/jni/Jxclick.cpp +index a597c00..05a240e 100644 +--- a/scilab/modules/gui/src/jni/Jxclick.cpp ++++ b/scilab/modules/gui/src/jni/Jxclick.cpp +@@ -1,5 +1,5 @@ + #include "Jxclick.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -139,22 +139,17 @@ jstringgetMenuCallbackID=NULL; + + // Generic methods + +- + void Jxclick::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "Jxclick"); + } + } + +- + void Jxclick::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "Jxclick"); + } + } +- + // Method(s) + + void Jxclick::xclick (JavaVM * jvm_){ +diff --git a/scilab/modules/gui/src/jni/Jxclick.hxx b/scilab/modules/gui/src/jni/Jxclick.hxx +index bc8aac1..d552d83 100644 +--- a/scilab/modules/gui/src/jni/Jxclick.hxx ++++ b/scilab/modules/gui/src/jni/Jxclick.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/gui/src/jni/Jxgetmouse.cpp b/scilab/modules/gui/src/jni/Jxgetmouse.cpp +index b9e71d6..b3a73af 100644 +--- a/scilab/modules/gui/src/jni/Jxgetmouse.cpp ++++ b/scilab/modules/gui/src/jni/Jxgetmouse.cpp +@@ -1,5 +1,5 @@ + #include "Jxgetmouse.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -139,22 +139,17 @@ jdoublegetYCoordinateID=NULL; + + // Generic methods + +- + void Jxgetmouse::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "Jxgetmouse"); + } + } + +- + void Jxgetmouse::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "Jxgetmouse"); + } + } +- + // Method(s) + + void Jxgetmouse::xgetmouse (JavaVM * jvm_){ +diff --git a/scilab/modules/gui/src/jni/Jxgetmouse.hxx b/scilab/modules/gui/src/jni/Jxgetmouse.hxx +index 0e2d931..a47958b 100644 +--- a/scilab/modules/gui/src/jni/Jxgetmouse.hxx ++++ b/scilab/modules/gui/src/jni/Jxgetmouse.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/gui/src/jni/LookAndFeelManager.cpp b/scilab/modules/gui/src/jni/LookAndFeelManager.cpp +index 796657c..e342ec4 100644 +--- a/scilab/modules/gui/src/jni/LookAndFeelManager.cpp ++++ b/scilab/modules/gui/src/jni/LookAndFeelManager.cpp +@@ -1,5 +1,5 @@ + #include "LookAndFeelManager.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -139,22 +139,17 @@ jintnumbersOfInstalledLookAndFeelsID=NULL; + + // Generic methods + +- + void LookAndFeelManager::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "LookAndFeelManager"); + } + } + +- + void LookAndFeelManager::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "LookAndFeelManager"); + } + } +- + // Method(s) + + bool LookAndFeelManager::isSupportedLookAndFeel (char * lookandfeel){ +diff --git a/scilab/modules/gui/src/jni/LookAndFeelManager.hxx b/scilab/modules/gui/src/jni/LookAndFeelManager.hxx +index 42cc1a4..6733171 100644 +--- a/scilab/modules/gui/src/jni/LookAndFeelManager.hxx ++++ b/scilab/modules/gui/src/jni/LookAndFeelManager.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/gui/src/jni/SwingScilabMenu.cpp b/scilab/modules/gui/src/jni/SwingScilabMenu.cpp +index 48abb79..b163ef6 100644 +--- a/scilab/modules/gui/src/jni/SwingScilabMenu.cpp ++++ b/scilab/modules/gui/src/jni/SwingScilabMenu.cpp +@@ -1,5 +1,5 @@ + #include "SwingScilabMenu.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -139,22 +139,17 @@ voiddestroyID=NULL; + + // Generic methods + +- + void SwingScilabMenu::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SwingScilabMenu"); + } + } + +- + void SwingScilabMenu::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SwingScilabMenu"); + } + } +- + // Method(s) + + void SwingScilabMenu::setText (char * newText){ +diff --git a/scilab/modules/gui/src/jni/SwingScilabMenu.hxx b/scilab/modules/gui/src/jni/SwingScilabMenu.hxx +index 0069de5..c148b5d 100644 +--- a/scilab/modules/gui/src/jni/SwingScilabMenu.hxx ++++ b/scilab/modules/gui/src/jni/SwingScilabMenu.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/gui/src/jni/UIElementMapper.cpp b/scilab/modules/gui/src/jni/UIElementMapper.cpp +index cc7bab7..e050539 100644 +--- a/scilab/modules/gui/src/jni/UIElementMapper.cpp ++++ b/scilab/modules/gui/src/jni/UIElementMapper.cpp +@@ -1,5 +1,5 @@ + #include "UIElementMapper.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -129,22 +129,17 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className()); + + // Generic methods + +- + void UIElementMapper::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "UIElementMapper"); + } + } + +- + void UIElementMapper::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "UIElementMapper"); + } + } +- + // Method(s) + + int UIElementMapper::getMaxId (){ +diff --git a/scilab/modules/gui/src/jni/UIElementMapper.hxx b/scilab/modules/gui/src/jni/UIElementMapper.hxx +index 219c398..07fc6c7 100644 +--- a/scilab/modules/gui/src/jni/UIElementMapper.hxx ++++ b/scilab/modules/gui/src/jni/UIElementMapper.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/helptools/src/jni/BuildDocObject.cpp b/scilab/modules/helptools/src/jni/BuildDocObject.cpp +index 0b61c8a..98814da 100644 +--- a/scilab/modules/helptools/src/jni/BuildDocObject.cpp ++++ b/scilab/modules/helptools/src/jni/BuildDocObject.cpp +@@ -1,5 +1,5 @@ + #include "BuildDocObject.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -135,22 +135,17 @@ jstringprocessjstringjstringID=NULL; + + // Generic methods + +- + void BuildDocObject::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "BuildDocObject"); + } + } + +- + void BuildDocObject::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "BuildDocObject"); + } + } +- + // Method(s) + + bool BuildDocObject::setOutputDirectory (char * directory){ +diff --git a/scilab/modules/helptools/src/jni/BuildDocObject.hxx b/scilab/modules/helptools/src/jni/BuildDocObject.hxx +index 3e3afc0..1c55009 100644 +--- a/scilab/modules/helptools/src/jni/BuildDocObject.hxx ++++ b/scilab/modules/helptools/src/jni/BuildDocObject.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/helptools/src/jni/GiwsException.cpp b/scilab/modules/helptools/src/jni/GiwsException.cpp +index fc4d53c..234e52b 100644 +--- a/scilab/modules/helptools/src/jni/GiwsException.cpp ++++ b/scilab/modules/helptools/src/jni/GiwsException.cpp +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -47,7 +47,7 @@ namespace GiwsException { + */ + JniException::JniException(JNIEnv * curEnv) throw() : exception() + { +-// retrieve informations about the exception ++// retrieve information about the exception + javaException = curEnv->ExceptionOccurred(); + /* Clear the Java Exception to avoid calling it again & again */ + curEnv->ExceptionClear(); +@@ -122,7 +122,7 @@ std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv) + { + // return the result of the getLocalizedMessage method + +-// retrieve informations from the exception. ++// retrieve information from the exception. + // get method id + jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), + "getLocalizedMessage", +@@ -153,7 +153,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + // return the result of the getStackTrace method + +- // retrieve informations from the exception. ++ // retrieve information from the exception. + // get method id + // getStackTrace returns an array of StackTraceElement + jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), +@@ -242,9 +242,9 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + } + + /** +- * To be called when all the informations about the exceptions have been ++ * To be called when all the information about the exceptions have been + * retrived. +- * Remove the exception from the environement. ++ * Remove the exception from the environment. + */ + void JniException::closeException(JNIEnv * curEnv) + { +@@ -293,7 +293,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + */ + + /** +- * @pram curEnv java environment where the exception occured. ++ * @param curEnv java environment where the exception occured. + */ + JniCallMethodException::JniCallMethodException(JNIEnv * curEnv) throw() : JniException(curEnv) + { +@@ -305,7 +305,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + JniCallMethodException::~JniCallMethodException(void) throw() {} + /** +- * @pram className name of the class which haven't been found ++ * @param className name of the class which haven't been found + */ + JniClassNotFoundException::JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -316,7 +316,7 @@ setErrorMessage(errorMessage); + JniClassNotFoundException::~JniClassNotFoundException(void) throw() {} + + /** +- * @pram className name of the method which haven't been found ++ * @param className name of the method which haven't been found + */ + JniMethodNotFoundException::JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw() : JniException(curEnv) + { +@@ -325,8 +325,9 @@ setErrorMessage(errorMessage); + } + + JniMethodNotFoundException::~JniMethodNotFoundException(void) throw() {} ++ + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException::JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -336,6 +337,17 @@ setErrorMessage(errorMessage); + + JniObjectCreationException::~JniObjectCreationException(void) throw() {} + ++ /** ++ * @param curEnv java envirnonment where the exception occured. ++ */ ++ JniMonitorException::JniMonitorException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) ++ { ++std::string errorMessage = "Error in the access (Enter or exit) or a Java env monitor of class " + className + "."; ++setErrorMessage(errorMessage); ++ } ++ ++ JniMonitorException::~JniMonitorException(void) throw() {} ++ + + + } +diff --git a/scilab/modules/helptools/src/jni/GiwsException.hxx b/scilab/modules/helptools/src/jni/GiwsException.hxx +index a2be211..73f8175 100644 +--- a/scilab/modules/helptools/src/jni/GiwsException.hxx ++++ b/scilab/modules/helptools/src/jni/GiwsException.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -129,9 +129,9 @@ std::string retrieveStackTrace(JNIEnv * curEnv); + */ + std::string retrieveExceptionName(JNIEnv * curEnv); + /** +-* To be called when all the informations about the exceptions have been ++* To be called when all the information about the exceptions have been + * retrived. +-* Remove the exception from the environement. ++* Remove the exception from the environment. + */ + void closeException(JNIEnv * curEnv); + +@@ -164,7 +164,7 @@ class JniCallMethodException : public JniException + public: + + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniCallMethodException(JNIEnv * curEnv) throw(); + +@@ -179,7 +179,7 @@ class JniClassNotFoundException : public JniException + public: + + /** +-* @pram className name of the class which haven't been found ++* @param className name of the class which haven't been found + */ + JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw(); + +@@ -195,7 +195,7 @@ class JniMethodNotFoundException : public JniException + public: + + /** +-* @pram className name of the method which haven't been found ++* @param className name of the method which haven't been found + */ + JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw(); + virtual ~JniMethodNotFoundException(void) throw(); +@@ -213,7 +213,7 @@ class JniObjectCreationException : public JniException + public: + + /** +-* @pram curEnv java envirnonment where the exception occured. ++* @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw(); + virtual ~JniObjectCreationException(void) throw(); +@@ -221,6 +221,23 @@ virtual ~JniObjectCreationException(void) throw(); + }; + + ++/** ++* Exception that should be thrown when a call to the Java monitor ++* failed ++*/ ++class JniMonitorException : public JniException ++{ ++public: ++ ++/** ++* @param curEnv java envirnonment where the exception occured. ++*/ ++JniMonitorException(JNIEnv * curEnv, const std::string & className) throw(); ++virtual ~JniMonitorException(void) throw(); ++ ++}; ++ ++ + } + #endif + +diff --git a/scilab/modules/renderer/src/jni/ArcFillDrawerGL.cpp b/scilab/modules/renderer/src/jni/ArcFillDrawerGL.cpp +index fa50823..6368a3b 100644 +--- a/scilab/modules/renderer/src/jni/ArcFillDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/ArcFillDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "ArcFillDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -145,22 +145,17 @@ voidsetUseNurbsjbooleanID=NULL; + + // Generic methods + +- + void ArcFillDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "ArcFillDrawerGL"); + } + } + +- + void ArcFillDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "ArcFillDrawerGL"); + } + } +- + // Method(s) + + void ArcFillDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/ArcFillDrawerGL.hxx b/scilab/modules/renderer/src/jni/ArcFillDrawerGL.hxx +index 3452ff7..7c238be 100644 +--- a/scilab/modules/renderer/src/jni/ArcFillDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/ArcFillDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/ArcLineDrawerGL.cpp b/scilab/modules/renderer/src/jni/ArcLineDrawerGL.cpp +index bdc26b2..ada2f87 100644 +--- a/scilab/modules/renderer/src/jni/ArcLineDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/ArcLineDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "ArcLineDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -145,22 +145,17 @@ voidsetUseNurbsjbooleanID=NULL; + + // Generic methods + +- + void ArcLineDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "ArcLineDrawerGL"); + } + } + +- + void ArcLineDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "ArcLineDrawerGL"); + } + } +- + // Method(s) + + void ArcLineDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/ArcLineDrawerGL.hxx b/scilab/modules/renderer/src/jni/ArcLineDrawerGL.hxx +index b08e89a..229736f 100644 +--- a/scilab/modules/renderer/src/jni/ArcLineDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/ArcLineDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.cpp b/scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.cpp +index 603d131..22ba164 100644 +--- a/scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "BackTrihedronDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawBoxjdoublejdoublejdoublejdoublejdoublejdoublejintID=NULL; + + // Generic methods + +- + void BackTrihedronDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "BackTrihedronDrawerGL"); + } + } + +- + void BackTrihedronDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "BackTrihedronDrawerGL"); + } + } +- + // Method(s) + + void BackTrihedronDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.hxx b/scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.hxx +index b310231..2c7f591 100644 +--- a/scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/BackTrihedronDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/CenteredTextDrawerGL.cpp b/scilab/modules/renderer/src/jni/CenteredTextDrawerGL.cpp +index 11a3a2e..f6ca693 100644 +--- a/scilab/modules/renderer/src/jni/CenteredTextDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/CenteredTextDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "CenteredTextDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -161,22 +161,17 @@ jdoubleArrayupdateParentFigurejintID=NULL; + + // Generic methods + +- + void CenteredTextDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "CenteredTextDrawerGL"); + } + } + +- + void CenteredTextDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "CenteredTextDrawerGL"); + } + } +- + // Method(s) + + void CenteredTextDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/CenteredTextDrawerGL.hxx b/scilab/modules/renderer/src/jni/CenteredTextDrawerGL.hxx +index 2ec7ccd..c886f89 100644 +--- a/scilab/modules/renderer/src/jni/CenteredTextDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/CenteredTextDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableArcGL.cpp b/scilab/modules/renderer/src/jni/DrawableArcGL.cpp +index 81394d8..fab5701 100644 +--- a/scilab/modules/renderer/src/jni/DrawableArcGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableArcGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableArcGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ voidunClipID=NULL; + + // Generic methods + +- + void DrawableArcGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableArcGL"); + } + } + +- + void DrawableArcGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableArcGL"); + } + } +- + // Method(s) + + void DrawableArcGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableArcGL.hxx b/scilab/modules/renderer/src/jni/DrawableArcGL.hxx +index 3a19ac8..1246f97 100644 +--- a/scilab/modules/renderer/src/jni/DrawableArcGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableArcGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableAxesGL.cpp b/scilab/modules/renderer/src/jni/DrawableAxesGL.cpp +index a558d3e..d61b16d 100644 +--- a/scilab/modules/renderer/src/jni/DrawableAxesGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableAxesGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableAxesGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ voidunClipID=NULL; + + // Generic methods + +- + void DrawableAxesGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableAxesGL"); + } + } + +- + void DrawableAxesGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableAxesGL"); + } + } +- + // Method(s) + + void DrawableAxesGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableAxesGL.hxx b/scilab/modules/renderer/src/jni/DrawableAxesGL.hxx +index 30f8093..82237b7 100644 +--- a/scilab/modules/renderer/src/jni/DrawableAxesGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableAxesGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableFecGL.cpp b/scilab/modules/renderer/src/jni/DrawableFecGL.cpp +index 6e96142..4614ce0 100644 +--- a/scilab/modules/renderer/src/jni/DrawableFecGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableFecGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableFecGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ voidunClipID=NULL; + + // Generic methods + +- + void DrawableFecGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableFecGL"); + } + } + +- + void DrawableFecGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableFecGL"); + } + } +- + // Method(s) + + void DrawableFecGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableFecGL.hxx b/scilab/modules/renderer/src/jni/DrawableFecGL.hxx +index c7b1994..5b55e42 100644 +--- a/scilab/modules/renderer/src/jni/DrawableFecGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableFecGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableFigureGL.cpp b/scilab/modules/renderer/src/jni/DrawableFigureGL.cpp +index d2eb288..db3f001 100644 +--- a/scilab/modules/renderer/src/jni/DrawableFigureGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableFigureGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableFigureGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -201,22 +201,17 @@ voidsetUseSingleBufferjbooleanID=NULL; + + // Generic methods + +- + void DrawableFigureGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableFigureGL"); + } + } + +- + void DrawableFigureGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableFigureGL"); + } + } +- + // Method(s) + + void DrawableFigureGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableFigureGL.hxx b/scilab/modules/renderer/src/jni/DrawableFigureGL.hxx +index 05ef0cf..8703d29 100644 +--- a/scilab/modules/renderer/src/jni/DrawableFigureGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableFigureGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableGrayplotGL.cpp b/scilab/modules/renderer/src/jni/DrawableGrayplotGL.cpp +index 809e65e..d0dc555 100644 +--- a/scilab/modules/renderer/src/jni/DrawableGrayplotGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableGrayplotGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableGrayplotGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -151,22 +151,17 @@ voiddrawGrayplotjdoubleArrayjdoubleArrayjdoublejintArrayID=NULL; + + // Generic methods + +- + void DrawableGrayplotGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableGrayplotGL"); + } + } + +- + void DrawableGrayplotGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableGrayplotGL"); + } + } +- + // Method(s) + + void DrawableGrayplotGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableGrayplotGL.hxx b/scilab/modules/renderer/src/jni/DrawableGrayplotGL.hxx +index a5bc85e..ce5c311 100644 +--- a/scilab/modules/renderer/src/jni/DrawableGrayplotGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableGrayplotGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawablePolylineGL.cpp b/scilab/modules/renderer/src/jni/DrawablePolylineGL.cpp +index fa6c4bd..365cdfb 100644 +--- a/scilab/modules/renderer/src/jni/DrawablePolylineGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawablePolylineGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawablePolylineGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ voidunClipID=NULL; + + // Generic methods + +- + void DrawablePolylineGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawablePolylineGL"); + } + } + +- + void DrawablePolylineGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawablePolylineGL"); + } + } +- + // Method(s) + + void DrawablePolylineGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawablePolylineGL.hxx b/scilab/modules/renderer/src/jni/DrawablePolylineGL.hxx +index 44d325a..a845c87 100644 +--- a/scilab/modules/renderer/src/jni/DrawablePolylineGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawablePolylineGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableRectangleGL.cpp b/scilab/modules/renderer/src/jni/DrawableRectangleGL.cpp +index 90d04f5..07cad7a 100644 +--- a/scilab/modules/renderer/src/jni/DrawableRectangleGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableRectangleGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableRectangleGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ voidunClipID=NULL; + + // Generic methods + +- + void DrawableRectangleGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableRectangleGL"); + } + } + +- + void DrawableRectangleGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableRectangleGL"); + } + } +- + // Method(s) + + void DrawableRectangleGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableRectangleGL.hxx b/scilab/modules/renderer/src/jni/DrawableRectangleGL.hxx +index c21604d..0bd1d32 100644 +--- a/scilab/modules/renderer/src/jni/DrawableRectangleGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableRectangleGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableSegsGL.cpp b/scilab/modules/renderer/src/jni/DrawableSegsGL.cpp +index 158f603..09598d1 100644 +--- a/scilab/modules/renderer/src/jni/DrawableSegsGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableSegsGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableSegsGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ voidunClipID=NULL; + + // Generic methods + +- + void DrawableSegsGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableSegsGL"); + } + } + +- + void DrawableSegsGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableSegsGL"); + } + } +- + // Method(s) + + void DrawableSegsGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableSegsGL.hxx b/scilab/modules/renderer/src/jni/DrawableSegsGL.hxx +index 729fbb8..4a89ccd 100644 +--- a/scilab/modules/renderer/src/jni/DrawableSegsGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableSegsGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableSubwinGL.cpp b/scilab/modules/renderer/src/jni/DrawableSubwinGL.cpp +index 03e0065..efc4016 100644 +--- a/scilab/modules/renderer/src/jni/DrawableSubwinGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableSubwinGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableSubwinGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -145,22 +145,17 @@ voidunzoomjlongID=NULL; + + // Generic methods + +- + void DrawableSubwinGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableSubwinGL"); + } + } + +- + void DrawableSubwinGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableSubwinGL"); + } + } +- + // Method(s) + + void DrawableSubwinGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableSubwinGL.hxx b/scilab/modules/renderer/src/jni/DrawableSubwinGL.hxx +index ad924b9..80f0215 100644 +--- a/scilab/modules/renderer/src/jni/DrawableSubwinGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableSubwinGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableSurfaceGL.cpp b/scilab/modules/renderer/src/jni/DrawableSurfaceGL.cpp +index 1d4eec6..d7c03a8 100644 +--- a/scilab/modules/renderer/src/jni/DrawableSurfaceGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableSurfaceGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableSurfaceGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ voidunClipID=NULL; + + // Generic methods + +- + void DrawableSurfaceGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableSurfaceGL"); + } + } + +- + void DrawableSurfaceGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableSurfaceGL"); + } + } +- + // Method(s) + + void DrawableSurfaceGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableSurfaceGL.hxx b/scilab/modules/renderer/src/jni/DrawableSurfaceGL.hxx +index 6335ad3..d19b205 100644 +--- a/scilab/modules/renderer/src/jni/DrawableSurfaceGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableSurfaceGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/DrawableTextGL.cpp b/scilab/modules/renderer/src/jni/DrawableTextGL.cpp +index 5020967..25a61b5 100644 +--- a/scilab/modules/renderer/src/jni/DrawableTextGL.cpp ++++ b/scilab/modules/renderer/src/jni/DrawableTextGL.cpp +@@ -1,5 +1,5 @@ + #include "DrawableTextGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ voidunClipID=NULL; + + // Generic methods + +- + void DrawableTextGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableTextGL"); + } + } + +- + void DrawableTextGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "DrawableTextGL"); + } + } +- + // Method(s) + + void DrawableTextGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/DrawableTextGL.hxx b/scilab/modules/renderer/src/jni/DrawableTextGL.hxx +index 5b583a8..14a29bb 100644 +--- a/scilab/modules/renderer/src/jni/DrawableTextGL.hxx ++++ b/scilab/modules/renderer/src/jni/DrawableTextGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/FecFacetDrawerGL.cpp b/scilab/modules/renderer/src/jni/FecFacetDrawerGL.cpp +index 68caec3..b5355f3 100644 +--- a/scilab/modules/renderer/src/jni/FecFacetDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/FecFacetDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "FecFacetDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawFecjdoubleArrayjdoubleArrayjdoubleArrayjintArrayjintArrayjintArrayID=NUL + + // Generic methods + +- + void FecFacetDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FecFacetDrawerGL"); + } + } + +- + void FecFacetDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FecFacetDrawerGL"); + } + } +- + // Method(s) + + void FecFacetDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/FecFacetDrawerGL.hxx b/scilab/modules/renderer/src/jni/FecFacetDrawerGL.hxx +index 957b3b8..7319bb7 100644 +--- a/scilab/modules/renderer/src/jni/FecFacetDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/FecFacetDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/FecLineDrawerGL.cpp b/scilab/modules/renderer/src/jni/FecLineDrawerGL.cpp +index 2831e6d..979eeae 100644 +--- a/scilab/modules/renderer/src/jni/FecLineDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/FecLineDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "FecLineDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawFecjdoubleArrayjdoubleArrayjdoubleArrayjintArrayjintArrayjintArrayID=NUL + + // Generic methods + +- + void FecLineDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FecLineDrawerGL"); + } + } + +- + void FecLineDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FecLineDrawerGL"); + } + } +- + // Method(s) + + void FecLineDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/FecLineDrawerGL.hxx b/scilab/modules/renderer/src/jni/FecLineDrawerGL.hxx +index 8b24969..e221b91 100644 +--- a/scilab/modules/renderer/src/jni/FecLineDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/FecLineDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/FilledTextDrawerGL.cpp b/scilab/modules/renderer/src/jni/FilledTextDrawerGL.cpp +index 15fa72e..d420cbf 100644 +--- a/scilab/modules/renderer/src/jni/FilledTextDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/FilledTextDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "FilledTextDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -163,22 +163,17 @@ jdoubleArrayupdateParentFigurejintID=NULL; + + // Generic methods + +- + void FilledTextDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FilledTextDrawerGL"); + } + } + +- + void FilledTextDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FilledTextDrawerGL"); + } + } +- + // Method(s) + + void FilledTextDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/FilledTextDrawerGL.hxx b/scilab/modules/renderer/src/jni/FilledTextDrawerGL.hxx +index 9129971..dc84934 100644 +--- a/scilab/modules/renderer/src/jni/FilledTextDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/FilledTextDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/FullBoxDrawerGL.cpp b/scilab/modules/renderer/src/jni/FullBoxDrawerGL.cpp +index 8573e75..3672217 100644 +--- a/scilab/modules/renderer/src/jni/FullBoxDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/FullBoxDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "FullBoxDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawBoxjdoublejdoublejdoublejdoublejdoublejdoublejintID=NULL; + + // Generic methods + +- + void FullBoxDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FullBoxDrawerGL"); + } + } + +- + void FullBoxDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "FullBoxDrawerGL"); + } + } +- + // Method(s) + + void FullBoxDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/FullBoxDrawerGL.hxx b/scilab/modules/renderer/src/jni/FullBoxDrawerGL.hxx +index d279baa..663a47a 100644 +--- a/scilab/modules/renderer/src/jni/FullBoxDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/FullBoxDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/GiwsException.cpp b/scilab/modules/renderer/src/jni/GiwsException.cpp +index fc4d53c..234e52b 100644 +--- a/scilab/modules/renderer/src/jni/GiwsException.cpp ++++ b/scilab/modules/renderer/src/jni/GiwsException.cpp +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -47,7 +47,7 @@ namespace GiwsException { + */ + JniException::JniException(JNIEnv * curEnv) throw() : exception() + { +-// retrieve informations about the exception ++// retrieve information about the exception + javaException = curEnv->ExceptionOccurred(); + /* Clear the Java Exception to avoid calling it again & again */ + curEnv->ExceptionClear(); +@@ -122,7 +122,7 @@ std::string JniException::retrieveExceptionMessage(JNIEnv * curEnv) + { + // return the result of the getLocalizedMessage method + +-// retrieve informations from the exception. ++// retrieve information from the exception. + // get method id + jmethodID getLocalizedMessageId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), + "getLocalizedMessage", +@@ -153,7 +153,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + // return the result of the getStackTrace method + +- // retrieve informations from the exception. ++ // retrieve information from the exception. + // get method id + // getStackTrace returns an array of StackTraceElement + jmethodID getStackTraceId = curEnv->GetMethodID(curEnv->GetObjectClass(javaException), +@@ -242,9 +242,9 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + } + + /** +- * To be called when all the informations about the exceptions have been ++ * To be called when all the information about the exceptions have been + * retrived. +- * Remove the exception from the environement. ++ * Remove the exception from the environment. + */ + void JniException::closeException(JNIEnv * curEnv) + { +@@ -293,7 +293,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + */ + + /** +- * @pram curEnv java environment where the exception occured. ++ * @param curEnv java environment where the exception occured. + */ + JniCallMethodException::JniCallMethodException(JNIEnv * curEnv) throw() : JniException(curEnv) + { +@@ -305,7 +305,7 @@ jstring description = (jstring) curEnv->CallObjectMethod(javaException, getLocal + + JniCallMethodException::~JniCallMethodException(void) throw() {} + /** +- * @pram className name of the class which haven't been found ++ * @param className name of the class which haven't been found + */ + JniClassNotFoundException::JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -316,7 +316,7 @@ setErrorMessage(errorMessage); + JniClassNotFoundException::~JniClassNotFoundException(void) throw() {} + + /** +- * @pram className name of the method which haven't been found ++ * @param className name of the method which haven't been found + */ + JniMethodNotFoundException::JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw() : JniException(curEnv) + { +@@ -325,8 +325,9 @@ setErrorMessage(errorMessage); + } + + JniMethodNotFoundException::~JniMethodNotFoundException(void) throw() {} ++ + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException::JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) + { +@@ -336,6 +337,17 @@ setErrorMessage(errorMessage); + + JniObjectCreationException::~JniObjectCreationException(void) throw() {} + ++ /** ++ * @param curEnv java envirnonment where the exception occured. ++ */ ++ JniMonitorException::JniMonitorException(JNIEnv * curEnv, const std::string & className) throw() : JniException(curEnv) ++ { ++std::string errorMessage = "Error in the access (Enter or exit) or a Java env monitor of class " + className + "."; ++setErrorMessage(errorMessage); ++ } ++ ++ JniMonitorException::~JniMonitorException(void) throw() {} ++ + + + } +diff --git a/scilab/modules/renderer/src/jni/GiwsException.hxx b/scilab/modules/renderer/src/jni/GiwsException.hxx +index a2be211..73f8175 100644 +--- a/scilab/modules/renderer/src/jni/GiwsException.hxx ++++ b/scilab/modules/renderer/src/jni/GiwsException.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -129,9 +129,9 @@ std::string retrieveStackTrace(JNIEnv * curEnv); + */ + std::string retrieveExceptionName(JNIEnv * curEnv); + /** +-* To be called when all the informations about the exceptions have been ++* To be called when all the information about the exceptions have been + * retrived. +-* Remove the exception from the environement. ++* Remove the exception from the environment. + */ + void closeException(JNIEnv * curEnv); + +@@ -164,7 +164,7 @@ class JniCallMethodException : public JniException + public: + + /** +- * @pram curEnv java envirnonment where the exception occured. ++ * @param curEnv java envirnonment where the exception occured. + */ + JniCallMethodException(JNIEnv * curEnv) throw(); + +@@ -179,7 +179,7 @@ class JniClassNotFoundException : public JniException + public: + + /** +-* @pram className name of the class which haven't been found ++* @param className name of the class which haven't been found + */ + JniClassNotFoundException(JNIEnv * curEnv, const std::string & className) throw(); + +@@ -195,7 +195,7 @@ class JniMethodNotFoundException : public JniException + public: + + /** +-* @pram className name of the method which haven't been found ++* @param className name of the method which haven't been found + */ + JniMethodNotFoundException(JNIEnv * curEnv, const std::string & methodName) throw(); + virtual ~JniMethodNotFoundException(void) throw(); +@@ -213,7 +213,7 @@ class JniObjectCreationException : public JniException + public: + + /** +-* @pram curEnv java envirnonment where the exception occured. ++* @param curEnv java envirnonment where the exception occured. + */ + JniObjectCreationException(JNIEnv * curEnv, const std::string & className) throw(); + virtual ~JniObjectCreationException(void) throw(); +@@ -221,6 +221,23 @@ virtual ~JniObjectCreationException(void) throw(); + }; + + ++/** ++* Exception that should be thrown when a call to the Java monitor ++* failed ++*/ ++class JniMonitorException : public JniException ++{ ++public: ++ ++/** ++* @param curEnv java envirnonment where the exception occured. ++*/ ++JniMonitorException(JNIEnv * curEnv, const std::string & className) throw(); ++virtual ~JniMonitorException(void) throw(); ++ ++}; ++ ++ + } + #endif + +diff --git a/scilab/modules/renderer/src/jni/GraphicSynchronizerJava.cpp b/scilab/modules/renderer/src/jni/GraphicSynchronizerJava.cpp +index b68ff28..ce6b188 100644 +--- a/scilab/modules/renderer/src/jni/GraphicSynchronizerJava.cpp ++++ b/scilab/modules/renderer/src/jni/GraphicSynchronizerJava.cpp +@@ -1,5 +1,5 @@ + #include "GraphicSynchronizerJava.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -135,22 +135,17 @@ jintgetCurrentThreadIdID=NULL; + + // Generic methods + +- + void GraphicSynchronizerJava::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "GraphicSynchronizerJava"); + } + } + +- + void GraphicSynchronizerJava::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "GraphicSynchronizerJava"); + } + } +- + // Method(s) + + void GraphicSynchronizerJava::wait (){ +diff --git a/scilab/modules/renderer/src/jni/GraphicSynchronizerJava.hxx b/scilab/modules/renderer/src/jni/GraphicSynchronizerJava.hxx +index 5a69fc9..cfa8cd0 100644 +--- a/scilab/modules/renderer/src/jni/GraphicSynchronizerJava.hxx ++++ b/scilab/modules/renderer/src/jni/GraphicSynchronizerJava.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/GridDrawerGL.cpp b/scilab/modules/renderer/src/jni/GridDrawerGL.cpp +index 897919b..63c9dec 100644 +--- a/scilab/modules/renderer/src/jni/GridDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/GridDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "GridDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -143,22 +143,17 @@ voidshowGridID=NULL; + + // Generic methods + +- + void GridDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "GridDrawerGL"); + } + } + +- + void GridDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "GridDrawerGL"); + } + } +- + // Method(s) + + void GridDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/GridDrawerGL.hxx b/scilab/modules/renderer/src/jni/GridDrawerGL.hxx +index a332497..0df5073 100644 +--- a/scilab/modules/renderer/src/jni/GridDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/GridDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/HalfBoxDrawerGL.cpp b/scilab/modules/renderer/src/jni/HalfBoxDrawerGL.cpp +index 1f534b3..04502f8 100644 +--- a/scilab/modules/renderer/src/jni/HalfBoxDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/HalfBoxDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "HalfBoxDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawBoxjdoublejdoublejdoublejdoublejdoublejdoublejintID=NULL; + + // Generic methods + +- + void HalfBoxDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "HalfBoxDrawerGL"); + } + } + +- + void HalfBoxDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "HalfBoxDrawerGL"); + } + } +- + // Method(s) + + void HalfBoxDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/HalfBoxDrawerGL.hxx b/scilab/modules/renderer/src/jni/HalfBoxDrawerGL.hxx +index 3abb245..591e3a1 100644 +--- a/scilab/modules/renderer/src/jni/HalfBoxDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/HalfBoxDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/IsoViewCameraGL.cpp b/scilab/modules/renderer/src/jni/IsoViewCameraGL.cpp +index 33f1901..3744bc1 100644 +--- a/scilab/modules/renderer/src/jni/IsoViewCameraGL.cpp ++++ b/scilab/modules/renderer/src/jni/IsoViewCameraGL.cpp +@@ -1,5 +1,5 @@ + #include "IsoViewCameraGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -169,22 +169,17 @@ voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID=NULL; + + // Generic methods + +- + void IsoViewCameraGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "IsoViewCameraGL"); + } + } + +- + void IsoViewCameraGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "IsoViewCameraGL"); + } + } +- + // Method(s) + + void IsoViewCameraGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/IsoViewCameraGL.hxx b/scilab/modules/renderer/src/jni/IsoViewCameraGL.hxx +index 5549a06..5937df2 100644 +--- a/scilab/modules/renderer/src/jni/IsoViewCameraGL.hxx ++++ b/scilab/modules/renderer/src/jni/IsoViewCameraGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/IsometricCameraGL.cpp b/scilab/modules/renderer/src/jni/IsometricCameraGL.cpp +index 54f7229..3aee67c 100644 +--- a/scilab/modules/renderer/src/jni/IsometricCameraGL.cpp ++++ b/scilab/modules/renderer/src/jni/IsometricCameraGL.cpp +@@ -1,5 +1,5 @@ + #include "IsometricCameraGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -169,22 +169,17 @@ voidsetAxesBoundsjdoublejdoublejdoublejdoublejdoublejdoubleID=NULL; + + // Generic methods + +- + void IsometricCameraGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "IsometricCameraGL"); + } + } + +- + void IsometricCameraGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "IsometricCameraGL"); + } + } +- + // Method(s) + + void IsometricCameraGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/IsometricCameraGL.hxx b/scilab/modules/renderer/src/jni/IsometricCameraGL.hxx +index 4285e90..233481c 100644 +--- a/scilab/modules/renderer/src/jni/IsometricCameraGL.hxx ++++ b/scilab/modules/renderer/src/jni/IsometricCameraGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.cpp b/scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.cpp +index e0a0f2f..063ec60 100644 +--- a/scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "PolylineArrowDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -145,22 +145,17 @@ voiddrawPolylineID=NULL; + + // Generic methods + +- + void PolylineArrowDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineArrowDrawerGL"); + } + } + +- + void PolylineArrowDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineArrowDrawerGL"); + } + } +- + // Method(s) + + void PolylineArrowDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.hxx b/scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.hxx +index 9e50db0..3dce55e 100644 +--- a/scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/PolylineArrowDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/PolylineBarDrawerGL.cpp b/scilab/modules/renderer/src/jni/PolylineBarDrawerGL.cpp +index 077c00c..a04e53a 100644 +--- a/scilab/modules/renderer/src/jni/PolylineBarDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/PolylineBarDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "PolylineBarDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawPolylinejdoubleArrayjdoubleArrayjdoubleArrayjdoubleArrayjdoubleArrayID=N + + // Generic methods + +- + void PolylineBarDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineBarDrawerGL"); + } + } + +- + void PolylineBarDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineBarDrawerGL"); + } + } +- + // Method(s) + + void PolylineBarDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/PolylineBarDrawerGL.hxx b/scilab/modules/renderer/src/jni/PolylineBarDrawerGL.hxx +index ca02143..6a07000 100644 +--- a/scilab/modules/renderer/src/jni/PolylineBarDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/PolylineBarDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/PolylineFillDrawerGL.cpp b/scilab/modules/renderer/src/jni/PolylineFillDrawerGL.cpp +index 1965c08..e433ce5 100644 +--- a/scilab/modules/renderer/src/jni/PolylineFillDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/PolylineFillDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "PolylineFillDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawPolylinejdoubleArrayjdoubleArrayjdoubleArrayID=NULL; + + // Generic methods + +- + void PolylineFillDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineFillDrawerGL"); + } + } + +- + void PolylineFillDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineFillDrawerGL"); + } + } +- + // Method(s) + + void PolylineFillDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/PolylineFillDrawerGL.hxx b/scilab/modules/renderer/src/jni/PolylineFillDrawerGL.hxx +index 57b6e9a..87f96b9 100644 +--- a/scilab/modules/renderer/src/jni/PolylineFillDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/PolylineFillDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.cpp b/scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.cpp +index efc3311..145bec0 100644 +--- a/scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "PolylineInterpColorDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -139,22 +139,17 @@ voiddrawPolylinejdoubleArrayjdoubleArrayjdoubleArrayjintArrayID=NULL; + + // Generic methods + +- + void PolylineInterpColorDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineInterpColorDrawerGL"); + } + } + +- + void PolylineInterpColorDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineInterpColorDrawerGL"); + } + } +- + // Method(s) + + void PolylineInterpColorDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.hxx b/scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.hxx +index 4c9dca6..bc2c348 100644 +--- a/scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/PolylineInterpColorDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/PolylineLineDrawerGL.cpp b/scilab/modules/renderer/src/jni/PolylineLineDrawerGL.cpp +index d412a2c..d03f06d 100644 +--- a/scilab/modules/renderer/src/jni/PolylineLineDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/PolylineLineDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "PolylineLineDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawPolylinejdoubleArrayjdoubleArrayjdoubleArrayID=NULL; + + // Generic methods + +- + void PolylineLineDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineLineDrawerGL"); + } + } + +- + void PolylineLineDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineLineDrawerGL"); + } + } +- + // Method(s) + + void PolylineLineDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/PolylineLineDrawerGL.hxx b/scilab/modules/renderer/src/jni/PolylineLineDrawerGL.hxx +index 2f9d2a7..e0bc987 100644 +--- a/scilab/modules/renderer/src/jni/PolylineLineDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/PolylineLineDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.cpp b/scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.cpp +index 5d350f8..38e2134 100644 +--- a/scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "PolylineMarkDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -143,22 +143,17 @@ voiddrawPolylineID=NULL; + + // Generic methods + +- + void PolylineMarkDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineMarkDrawerGL"); + } + } + +- + void PolylineMarkDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "PolylineMarkDrawerGL"); + } + } +- + // Method(s) + + void PolylineMarkDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.hxx b/scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.hxx +index e02f312..57dbe56 100644 +--- a/scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/PolylineMarkDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/RectangleFillDrawerGL.cpp b/scilab/modules/renderer/src/jni/RectangleFillDrawerGL.cpp +index 72d1f9d..d8daa5a 100644 +--- a/scilab/modules/renderer/src/jni/RectangleFillDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/RectangleFillDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "RectangleFillDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawRectanglejdoublejdoublejdoublejdoublejdoublejdoublejdoublejdoublejdouble + + // Generic methods + +- + void RectangleFillDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "RectangleFillDrawerGL"); + } + } + +- + void RectangleFillDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "RectangleFillDrawerGL"); + } + } +- + // Method(s) + + void RectangleFillDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/RectangleFillDrawerGL.hxx b/scilab/modules/renderer/src/jni/RectangleFillDrawerGL.hxx +index e67ec96..657b71d 100644 +--- a/scilab/modules/renderer/src/jni/RectangleFillDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/RectangleFillDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/RectangleLineDrawerGL.cpp b/scilab/modules/renderer/src/jni/RectangleLineDrawerGL.cpp +index df872d7..9c3c47b 100644 +--- a/scilab/modules/renderer/src/jni/RectangleLineDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/RectangleLineDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "RectangleLineDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawRectanglejdoublejdoublejdoublejdoublejdoublejdoublejdoublejdoublejdouble + + // Generic methods + +- + void RectangleLineDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "RectangleLineDrawerGL"); + } + } + +- + void RectangleLineDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "RectangleLineDrawerGL"); + } + } +- + // Method(s) + + void RectangleLineDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/RectangleLineDrawerGL.hxx b/scilab/modules/renderer/src/jni/RectangleLineDrawerGL.hxx +index 76075d7..189caeb 100644 +--- a/scilab/modules/renderer/src/jni/RectangleLineDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/RectangleLineDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.cpp b/scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.cpp +index 7d25c54..1d50848 100644 +--- a/scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "RectangleMarkDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -143,22 +143,17 @@ voiddrawRectangleID=NULL; + + // Generic methods + +- + void RectangleMarkDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "RectangleMarkDrawerGL"); + } + } + +- + void RectangleMarkDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "RectangleMarkDrawerGL"); + } + } +- + // Method(s) + + void RectangleMarkDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.hxx b/scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.hxx +index fb3b8c1..4b87f39 100644 +--- a/scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/RectangleMarkDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/RenderingChecker.cpp b/scilab/modules/renderer/src/jni/RenderingChecker.cpp +index 0ef881c..96c3b7f 100644 +--- a/scilab/modules/renderer/src/jni/RenderingChecker.cpp ++++ b/scilab/modules/renderer/src/jni/RenderingChecker.cpp +@@ -1,5 +1,5 @@ + #include "RenderingChecker.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -129,22 +129,17 @@ throw GiwsException::JniObjectCreationException(curEnv, this->className()); + + // Generic methods + +- + void RenderingChecker::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "RenderingChecker"); + } + } + +- + void RenderingChecker::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "RenderingChecker"); + } + } +- + // Method(s) + + bool RenderingChecker::isAbleToCreateWindow (JavaVM * jvm_){ +diff --git a/scilab/modules/renderer/src/jni/RenderingChecker.hxx b/scilab/modules/renderer/src/jni/RenderingChecker.hxx +index 2142fe6..724e553 100644 +--- a/scilab/modules/renderer/src/jni/RenderingChecker.hxx ++++ b/scilab/modules/renderer/src/jni/RenderingChecker.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/SegsArrowDrawerGL.cpp b/scilab/modules/renderer/src/jni/SegsArrowDrawerGL.cpp +index 5116daa..cb1b093 100644 +--- a/scilab/modules/renderer/src/jni/SegsArrowDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/SegsArrowDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "SegsArrowDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -147,22 +147,17 @@ voiddrawSegsID=NULL; + + // Generic methods + +- + void SegsArrowDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SegsArrowDrawerGL"); + } + } + +- + void SegsArrowDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SegsArrowDrawerGL"); + } + } +- + // Method(s) + + void SegsArrowDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/SegsArrowDrawerGL.hxx b/scilab/modules/renderer/src/jni/SegsArrowDrawerGL.hxx +index d386a5b..f296eba 100644 +--- a/scilab/modules/renderer/src/jni/SegsArrowDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/SegsArrowDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/SegsLineDrawerGL.cpp b/scilab/modules/renderer/src/jni/SegsLineDrawerGL.cpp +index 04668ba..0d25c90 100644 +--- a/scilab/modules/renderer/src/jni/SegsLineDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/SegsLineDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "SegsLineDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawSegsjdoubleArrayjdoubleArrayjdoubleArrayjdoubleArrayjdoubleArrayjdoubleA + + // Generic methods + +- + void SegsLineDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SegsLineDrawerGL"); + } + } + +- + void SegsLineDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SegsLineDrawerGL"); + } + } +- + // Method(s) + + void SegsLineDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/SegsLineDrawerGL.hxx b/scilab/modules/renderer/src/jni/SegsLineDrawerGL.hxx +index 47b1dcf..baba07f 100644 +--- a/scilab/modules/renderer/src/jni/SegsLineDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/SegsLineDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/SegsMarkDrawerGL.cpp b/scilab/modules/renderer/src/jni/SegsMarkDrawerGL.cpp +index 7c75fd3..44c99cf 100644 +--- a/scilab/modules/renderer/src/jni/SegsMarkDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/SegsMarkDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "SegsMarkDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -143,22 +143,17 @@ voiddrawSegsID=NULL; + + // Generic methods + +- + void SegsMarkDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SegsMarkDrawerGL"); + } + } + +- + void SegsMarkDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SegsMarkDrawerGL"); + } + } +- + // Method(s) + + void SegsMarkDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/SegsMarkDrawerGL.hxx b/scilab/modules/renderer/src/jni/SegsMarkDrawerGL.hxx +index f82060e..c4fd957 100644 +--- a/scilab/modules/renderer/src/jni/SegsMarkDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/SegsMarkDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/StandardTextDrawerGL.cpp b/scilab/modules/renderer/src/jni/StandardTextDrawerGL.cpp +index 2316d7f..6ee4c79 100644 +--- a/scilab/modules/renderer/src/jni/StandardTextDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/StandardTextDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "StandardTextDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -159,22 +159,17 @@ jdoubleArrayupdateParentFigurejintID=NULL; + + // Generic methods + +- + void StandardTextDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "StandardTextDrawerGL"); + } + } + +- + void StandardTextDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "StandardTextDrawerGL"); + } + } +- + // Method(s) + + void StandardTextDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/StandardTextDrawerGL.hxx b/scilab/modules/renderer/src/jni/StandardTextDrawerGL.hxx +index 3982620..d012cfb 100644 +--- a/scilab/modules/renderer/src/jni/StandardTextDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/StandardTextDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.cpp b/scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.cpp +index 1a973a5..387d264 100644 +--- a/scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "SubwinBackgroundDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -141,22 +141,17 @@ voiddrawBoxjdoublejdoublejdoublejdoublejdoublejdoublejintID=NULL; + + // Generic methods + +- + void SubwinBackgroundDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SubwinBackgroundDrawerGL"); + } + } + +- + void SubwinBackgroundDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SubwinBackgroundDrawerGL"); + } + } +- + // Method(s) + + void SubwinBackgroundDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.hxx b/scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.hxx +index 565bcd8..bab99a7 100644 +--- a/scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/SubwinBackgroundDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.cpp b/scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.cpp +index 03e5002..7e25e4d 100644 +--- a/scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "SurfaceFacetDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -145,22 +145,17 @@ voidsetFacetsColorsjdoubleArrayID=NULL; + + // Generic methods + +- + void SurfaceFacetDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SurfaceFacetDrawerGL"); + } + } + +- + void SurfaceFacetDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SurfaceFacetDrawerGL"); + } + } +- + // Method(s) + + void SurfaceFacetDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.hxx b/scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.hxx +index 1289113..8da4b9c 100644 +--- a/scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/SurfaceFacetDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.cpp b/scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.cpp +index 0cee266..8238c3d 100644 +--- a/scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "SurfaceLineDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -143,22 +143,17 @@ voiddrawSurfacejdoubleArrayjdoubleArrayjdoubleArrayjintID=NULL; + + // Generic methods + +- + void SurfaceLineDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SurfaceLineDrawerGL"); + } + } + +- + void SurfaceLineDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SurfaceLineDrawerGL"); + } + } +- + // Method(s) + + void SurfaceLineDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.hxx b/scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.hxx +index 607b608..4b8c0b9 100644 +--- a/scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/SurfaceLineDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.cpp b/scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.cpp +index bba341d..b6dcac9 100644 +--- a/scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "SurfaceMarkDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -145,22 +145,17 @@ voiddrawSurfaceID=NULL; + + // Generic methods + +- + void SurfaceMarkDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SurfaceMarkDrawerGL"); + } + } + +- + void SurfaceMarkDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "SurfaceMarkDrawerGL"); + } + } +- + // Method(s) + + void SurfaceMarkDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.hxx b/scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.hxx +index 096d648..1b18b12 100644 +--- a/scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/SurfaceMarkDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/TicksDrawerGL.cpp b/scilab/modules/renderer/src/jni/TicksDrawerGL.cpp +index 2643155..b8d702a 100644 +--- a/scilab/modules/renderer/src/jni/TicksDrawerGL.cpp ++++ b/scilab/modules/renderer/src/jni/TicksDrawerGL.cpp +@@ -1,5 +1,5 @@ + #include "TicksDrawerGL.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -159,22 +159,17 @@ voidsetNeedTicksDecimationjbooleanID=NULL; + + // Generic methods + +- + void TicksDrawerGL::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "TicksDrawerGL"); + } + } + +- + void TicksDrawerGL::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "TicksDrawerGL"); + } + } +- + // Method(s) + + void TicksDrawerGL::display (){ +diff --git a/scilab/modules/renderer/src/jni/TicksDrawerGL.hxx b/scilab/modules/renderer/src/jni/TicksDrawerGL.hxx +index d1b2a89..27c3d14 100644 +--- a/scilab/modules/renderer/src/jni/TicksDrawerGL.hxx ++++ b/scilab/modules/renderer/src/jni/TicksDrawerGL.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +diff --git a/scilab/modules/renderer/src/jni/XlFontManager.cpp b/scilab/modules/renderer/src/jni/XlFontManager.cpp +index 63dd852..566d790 100644 +--- a/scilab/modules/renderer/src/jni/XlFontManager.cpp ++++ b/scilab/modules/renderer/src/jni/XlFontManager.cpp +@@ -1,5 +1,5 @@ + #include "XlFontManager.hxx" +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA +@@ -149,22 +149,17 @@ jintchangeFontFromFilenamejintjstringID=NULL; + + // Generic methods + +- + void XlFontManager::synchronize() { + if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) { +-std::cerr << "Fail to enter monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "XlFontManager"); + } + } + +- + void XlFontManager::endSynchronize() { + if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) { +-std::cerr << "Fail to exit monitor." << std::endl; +-exit(EXIT_FAILURE); ++throw GiwsException::JniMonitorException(getCurrentEnv(), "XlFontManager"); + } + } +- + // Method(s) + + char ** XlFontManager::getInstalledFontsName (){ +diff --git a/scilab/modules/renderer/src/jni/XlFontManager.hxx b/scilab/modules/renderer/src/jni/XlFontManager.hxx +index c50394c..8ae1150 100644 +--- a/scilab/modules/renderer/src/jni/XlFontManager.hxx ++++ b/scilab/modules/renderer/src/jni/XlFontManager.hxx +@@ -1,4 +1,4 @@ +-/* Generated by GIWS (version 1.0.1) */ ++/* Generated by GIWS (version 1.0.2) */ + /* + + Copyright 2007-2008 INRIA --- scilab-5.1.1.orig/debian/patches/modelicac-not-available.diff +++ scilab-5.1.1/debian/patches/modelicac-not-available.diff @@ -0,0 +1,59 @@ +diff -ur scilab-5.1.1.orig/modules/scicos/macros/scicos_scicos/build_block.sci scilab-5.1.1/modules/scicos/macros/scicos_scicos/build_block.sci +--- scilab-5.1.1.orig/modules/scicos/macros/scicos_scicos/build_block.sci 2009-04-14 09:31:05.000000000 +0200 ++++ scilab-5.1.1/modules/scicos/macros/scicos_scicos/build_block.sci 2009-04-30 11:28:37.000000000 +0200 +@@ -72,7 +72,7 @@ + //++ Check that modelica compiler is available + //++ Otherwise, give some feedback and quit + if ~with_modelica_compiler() then +- messagebox(sprintf(gettext("%s: Error: Modelica compiler (MODELICAC) is unavailable."), "build_block"),"modal","error"); ++ messagebox(sprintf(gettext("%s: Error: Modelica compiler (MODELICAC) is unavailable.")+" This is probably due to the non support of ocamlopt on your architecture.", "build_block"),"modal","error"); + ok = %f + end + +diff -ur scilab-5.1.1.orig/modules/scicos/macros/scicos_scicos/compile_modelica.sci scilab-5.1.1/modules/scicos/macros/scicos_scicos/compile_modelica.sci +--- scilab-5.1.1.orig/modules/scicos/macros/scicos_scicos/compile_modelica.sci 2009-04-14 09:31:05.000000000 +0200 ++++ scilab-5.1.1/modules/scicos/macros/scicos_scicos/compile_modelica.sci 2009-04-30 11:28:37.000000000 +0200 +@@ -25,7 +25,7 @@ + //++ Check that modelica compiler is available + //++ Otherwise, give some feedback and quit + if ~with_modelica_compiler() then +- messagebox(sprintf(gettext("%s: Error: Modelica compiler (MODELICAC) is unavailable."), "compile_modelica"),"modal","error"); ++ messagebox(sprintf(gettext("%s: Error: Modelica compiler (MODELICAC) is unavailable.")+" This is probably due to the non support of ocamlopt on your architecture.", "compile_modelica"),"modal","error"); + name = '' + ok = %f, nx = 0, nin = 0, nout = 0, ng = 0, nm = 0, nz = 0; return + end +@@ -145,7 +145,7 @@ + MSG1; .. + 'Please read the error message in the Scilab window'; .. + ' '; .. +- 'Please install the Modelica translator (available at www.scicos.org) in ""SCI' + filesep() + 'bin"" and try again'],"modal","error"); ++ 'The modelica compiler is not available on this arch because of non-support of ocamlopt for this architecture'],"modal","error"); + ok = %f, nx = 0, nin = 0, nout = 0, ng = 0, nm = 0, nz = 0; return + end // if_translator_exists + end // if_modelicac_fails_then_use_translator +diff -ur scilab-5.1.1.orig/modules/scicos/macros/scicos_scicos/genmoc.sci scilab-5.1.1/modules/scicos/macros/scicos_scicos/genmoc.sci +--- scilab-5.1.1.orig/modules/scicos/macros/scicos_scicos/genmoc.sci 2009-04-14 09:31:05.000000000 +0200 ++++ scilab-5.1.1/modules/scicos/macros/scicos_scicos/genmoc.sci 2009-04-30 11:32:34.000000000 +0200 +@@ -29,7 +29,7 @@ + //++ Check that modelica compiler is available + //++ Otherwise, give some feedback and quit + if ~with_modelica_compiler() then +- error(sprintf(gettext("%s: Error: Modelica compiler (MODELICAC) is unavailable.\n"), "genmoc")) ++ error(sprintf(gettext("%s: Error: Modelica compiler (MODELICAC) is unavailable.\n")+" This is probably due to the non support of ocamlopt on your architecture.", "genmoc")) + return + end + +Seulement dans scilab-5.1.1/modules/scicos/macros/scicos_scicos: genmoc.sci.orig +Seulement dans scilab-5.1.1/modules/scicos/macros/scicos_scicos: genmoc.sci.rej +diff -ur scilab-5.1.1.orig/modules/scicos/macros/scicos_scicos/MODCOM.sci scilab-5.1.1/modules/scicos/macros/scicos_scicos/MODCOM.sci +--- scilab-5.1.1.orig/modules/scicos/macros/scicos_scicos/MODCOM.sci 2009-04-14 09:31:05.000000000 +0200 ++++ scilab-5.1.1/modules/scicos/macros/scicos_scicos/MODCOM.sci 2009-04-30 11:28:37.000000000 +0200 +@@ -80,7 +80,7 @@ + //++ Check that modelica compiler is available + //++ Otherwise, give some feedback and quit + if ~with_modelica_compiler() then +- messagebox(sprintf(gettext("%s: Error: Modelica compiler (MODELICAC) is unavailable."), "MODCOM"),"modal","error"); ++ messagebox(sprintf(gettext("%s: Error: Modelica compiler (MODELICAC) is unavailable.")+" This is probably due to the non support of ocamlopt on your architecture.", "MODCOM"),"modal","error"); + ok = %f + break + end --- scilab-5.1.1.orig/debian/patches/fpu_control.diff +++ scilab-5.1.1/debian/patches/fpu_control.diff @@ -0,0 +1,19 @@ +commit 4c755b187d24146d11f4c8a1f16c9d2eebbfa200 +Author: Sylvestre Ledru +Date: Tue Apr 21 13:51:16 2009 +0200 + + Only activate under Linux / X86 + +diff --git a/scilab/modules/core/src/c/setPrecisionFPU.c b/scilab/modules/core/src/c/setPrecisionFPU.c +index 351809e..438c325 100644 +--- a/scilab/modules/core/src/c/setPrecisionFPU.c ++++ b/scilab/modules/core/src/c/setPrecisionFPU.c +@@ -11,7 +11,7 @@ + */ + /*--------------------------------------------------------------------------*/ + +-#if defined(linux) && ! defined(IS_64_BITS_CPU) ++#if defined(linux) && defined(__i386__) + #include + #include "setPrecisionFPU.h" + /* --- scilab-5.1.1.orig/debian/patches/z_java_debug.diff +++ scilab-5.1.1/debian/patches/z_java_debug.diff @@ -0,0 +1,119 @@ +diff --git a/scilab/m4/java.m4 b/scilab/m4/java.m4 +index 52c571f..02c9063 100644 +--- a/scilab/m4/java.m4 ++++ b/scilab/m4/java.m4 +@@ -120,7 +120,7 @@ AC_DEFUN([AC_PROG_JAVAC], [ + AC_MSG_ERROR([Could not compile simple Java program with '$JAVAC'. Try with the Sun JDK (1.5 or 6).]) + fi + +- AC_MSG_LOG([Using JAVAC=$JAVAC], 1) ++ AC_MSG_LOG([Using JAVAC=$JAVAC]) + ]) + + +@@ -304,7 +304,7 @@ AC_DEFUN([AC_JAVA_CLASSPATH], [ + ac_java_classpath="${ac_java_classpath}:${CLASSPATH}" + fi + +- AC_MSG_LOG([Using CLASSPATH=$ac_java_classpath], 1) ++ AC_MSG_LOG([Using CLASSPATH=$ac_java_classpath],1) + AC_MSG_RESULT($ac_java_classpath) + ]) + +@@ -430,6 +430,8 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + ;; + esac + ++ AC_MSG_LOG([Looking for JNI libs with $machine as machine hardware name]) ++ + # Check for known JDK installation layouts + + # Gives the name of the symbol we want to look for. +@@ -441,9 +443,9 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + + F=jre/lib/$machine/libjava.so + if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then +- AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F]) + if test -f $ac_java_jvm_dir/$F ; then +- AC_MSG_LOG([Found $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Found $ac_java_jvm_dir/$F]) + D=`dirname $ac_java_jvm_dir/$F` + ac_java_jvm_jni_lib_runtime_path=$D + ac_java_jvm_jni_lib_flags="-L$D -ljava -lverify" +@@ -469,9 +471,9 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + + F=jre/lib/amd64/libjava.so + if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then +- AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F]) + if test -f $ac_java_jvm_dir/$F ; then +- AC_MSG_LOG([Found $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Found $ac_java_jvm_dir/$F]) + + D=`dirname $ac_java_jvm_dir/$F` + ac_java_jvm_jni_lib_runtime_path=$D +@@ -487,9 +489,9 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + + F=jre/lib/i386/client/libjvm.so + if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then +- AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F]) + if test -f $ac_java_jvm_dir/$F ; then +- AC_MSG_LOG([Found $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Found $ac_java_jvm_dir/$F]) + + D=`dirname $ac_java_jvm_dir/$F` + ac_java_jvm_jni_lib_runtime_path=$D +@@ -505,9 +507,9 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + + F=jre/bin/classic/libjvm.so + if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then +- AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F]) + if test -f $ac_java_jvm_dir/$F ; then +- AC_MSG_LOG([Found $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Found $ac_java_jvm_dir/$F]) + + D=`dirname $ac_java_jvm_dir/$F` + ac_java_jvm_jni_lib_runtime_path=$D +@@ -523,9 +525,9 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + + F=../Libraries/libjava.jnilib + if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then +- AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F]) + if test -f $ac_java_jvm_dir/$F ; then +- AC_MSG_LOG([Found $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Found $ac_java_jvm_dir/$F]) + libSymbolToTest="JNI_GetCreatedJavaVMs_Impl" + + D=`dirname $ac_java_jvm_dir/$F` +@@ -542,14 +544,14 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + + F=lib/jvm.lib + if test "x$ac_java_jvm_jni_lib_flags" = "x" ; then +- AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Looking for $ac_java_jvm_dir/$F]) + if test -f $ac_java_jvm_dir/$F ; then + # jre/bin/client must contain jvm.dll + # jre/bin/server directory could also contain jvm.dll, + # just assume the user wants to use the client JVM. + DLL=jre/bin/client/jvm.dll + if test -f $ac_java_jvm_dir/$DLL ; then +- AC_MSG_LOG([Found $ac_java_jvm_dir/$F], 1) ++ AC_MSG_LOG([Found $ac_java_jvm_dir/$F]) + D1=$ac_java_jvm_dir/jre/bin + D2=$ac_java_jvm_dir/jre/bin/client + ac_java_jvm_jni_lib_runtime_path="${D1}:${D2}" +@@ -570,8 +572,8 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + AC_MSG_LOG([Using the following JNI library flags $ac_java_jvm_jni_lib_flags]) + AC_MSG_LOG([Using the following runtime library path $ac_java_jvm_jni_lib_runtime_path]) + +- AC_MSG_LOG([Using LD_PRELOAD=$ac_java_jvm_ld_preload], 1) +- AC_MSG_LOG([Using LD_BIND_NOW=$ac_java_jvm_ld_bind_now], 1) ++ AC_MSG_LOG([Using LD_PRELOAD=$ac_java_jvm_ld_preload],1) ++ AC_MSG_LOG([Using LD_BIND_NOW=$ac_java_jvm_ld_bind_now],1) + + # Make sure we can compile and link a trivial JNI program + --- scilab-5.1.1.orig/debian/patches/alphabuild.diff +++ scilab-5.1.1/debian/patches/alphabuild.diff @@ -0,0 +1,11 @@ +--- scilab-5.1.1.obsolete.0.255851055801944/modules/core/includes/getmemory.h 2009-04-14 09:30:43.000000000 +0200 ++++ scilab-5.1.1/modules/core/includes/getmemory.h 2009-05-13 15:07:15.000000000 +0200 +@@ -28,7 +28,7 @@ + #endif + #endif + #endif +- #if defined(__alpha) ++ #if defined(__alpha) && !defined(linux) + #include + #include + #endif --- scilab-5.1.1.orig/debian/patches/s390javadetection.diff +++ scilab-5.1.1/debian/patches/s390javadetection.diff @@ -0,0 +1,14 @@ +diff --git a/scilab/m4/java.m4 b/scilab/m4/java.m4 +index 294de10..52c571f 100644 +--- a/scilab/m4/java.m4 ++++ b/scilab/m4/java.m4 +@@ -425,6 +425,9 @@ AC_DEFUN([AC_JAVA_JNI_LIBS], [ + powerpc|ppc64) + machine=ppc + ;; ++ s390x) # s390 arch can also returns s390x ++ machine=s390 ++ ;; + esac + + # Check for known JDK installation layouts --- scilab-5.1.1.orig/debian/patches/adddemo.diff +++ scilab-5.1.1/debian/patches/adddemo.diff @@ -0,0 +1,23 @@ +diff -Nur scilab-5.1.1.orig/modules/core/macros/add_demo.sci scilab-5.1.1/modules/core/macros/add_demo.sci +--- scilab-5.1.1.orig/modules/core/macros/add_demo.sci 2009-04-14 09:30:44.000000000 +0200 ++++ scilab-5.1.1/modules/core/macros/add_demo.sci 2009-04-14 17:54:41.000000000 +0200 +@@ -17,9 +17,7 @@ + + path=pathconvert(path,%f,%t); + +- if fileinfo(path)==[] then +- error(msprintf(gettext("%s: The file %s does not exist.\n"),"add_demo",path)); +- end ++ if fileinfo(path) <> [] then + + if isdir(path) then + error(msprintf(gettext("%s: Wrong input argument #%d: Path to a scilab script file expected.\n"),"add_demo",2)); +@@ -33,7 +31,7 @@ + k1=find(demolist(k,2)==path) + if k1==[] then demolist=[demolist;demotitle+" ("+string(size(k,"*"))+")",path],end + end +- ++ end + clear demolist + + endfunction \ No newline at end of file --- scilab-5.1.1.orig/debian/patches/javaruntimedetection.diff +++ scilab-5.1.1/debian/patches/javaruntimedetection.diff @@ -0,0 +1,28 @@ +diff --git a/scilab/bin/scilab b/scilab/bin/scilab +index d7a7828..7efaf1a 100755 +--- a/scilab/bin/scilab ++++ b/scilab/bin/scilab +@@ -336,16 +336,21 @@ case $OS in + fi + ;; + "ia64") +- proc="i64" ++ proc="ia64" + ;; +- "ppc") ++ "ppc"|"powerpc"|"ppc64") + proc="ppc" + ;; + "alpha") + proc="alpha" + ;; ++ "s390"|"s390x") ++ proc="s390" ++ ;; + *) + echo "Could not find the Java configuration for the model <${MODEL}>. Please contact us." ++ echo "Fallback on the model <${MODEL}> found by uname -m" ++ proc=$MODEL + ;; + esac + ;; --- scilab-5.1.1.orig/debian/patches/ocaml-not-available.diff +++ scilab-5.1.1/debian/patches/ocaml-not-available.diff @@ -0,0 +1,74 @@ +--- scilab-5.1.1.orig/configure.ac 2009-04-14 09:30:40.000000000 +0200 ++++ scilab-5.1.1/configure.ac 2009-04-28 19:19:41.000000000 +0200 +@@ -763,7 +763,7 @@ + ### If isinf exists or not (used to not be the case under Solaris) + ### See bug #4164 + AC_CHECK_FUNC([isinf],,[ +- AC_DEFINE([isinf(x)],[return !finite(x) && x==x;],[Provide a macro to do isinf]) ++ AC_DEFINE([isinf(x)],[(!finite(x) && x==x)],[Provide a macro to do isinf]) + ]) + + LDFLAGS="$save_LDFLAGS" +@@ -885,7 +885,7 @@ + fi + AC_SUBST(SCICOS_ENABLE) + +-AM_CONDITIONAL(OCAML, test "$with_ocaml" != no) ++AM_CONDITIONAL(OCAML, test "$with_ocaml" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no) + AM_CONDITIONAL(SCICOS, test "$with_scicos" != no -a "$with_gui" != no) + + +@@ -1424,10 +1424,14 @@ + if test $SCICOS_ENABLE = yes; then + echo "Scicos enable" + echo "" ++if test "$with_ocaml" != no -a "$OCAMLC" != no -a "$OCAMLOPT" != no; then + echo "Ocaml Configuration (for Modelica compiler):" + echo "OCAMLC ............. = $OCAMLC" + echo "OCAMLOPT ........... = $OCAMLOPT" + echo "OCAMLDEP ........... = $OCAMLDEP" ++else ++ echo "Will not build Modelica compiler" ++fi + else + echo "Not using Scicos" + fi + +--- scilab-5.1.1.orig/m4/ocaml.m4 ++++ scilab-5.1.1/ocaml.m4 +@@ -12,30 +12,25 @@ AC_DEFUN([AC_CHECK_PROG_OCAML],[ + OCAMLDEP= + AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,no) + if test "$OCAMLC" = no; then +- AC_MSG_ERROR([ocamlc not found. Mandatory to build Scicos (Use --without-ocaml to disable the Modelica compiler).]) ++ AC_MSG_WARN([ocamlc not found. Mandatory to build the Scicos modelica compiler (Use --without-ocaml to disable the Modelica compiler).]) + fi + AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt,no) + if test "$OCAMLOPT" = no; then +- AC_MSG_ERROR([ocamlopt not found. Mandatory to build Scicos.]) ++ AC_MSG_WARN([ocamlopt not found. Mandatory to build the Scicos modelica compiler.]) + fi + AC_CHECK_PROG(OCAMLDEP,ocamldep,ocamldep,no) + if test "$OCAMLDEP" = no; then +- AC_MSG_ERROR([ocamldep not found. Mandatory to build Scicos.]) ++ AC_MSG_WARN([ocamldep not found. Mandatory to build the Scicos modelica compiler.]) + fi + AC_CHECK_PROG(OCAMLYACC,ocamlyacc,ocamlyacc,no) + if test "$OCAMLYACC" = no; then +- AC_MSG_ERROR([ocamlyacc not found. Mandatory to build Scicos.]) ++ AC_MSG_WARN([ocamlyacc not found. Mandatory to build the Scicos modelica compiler.]) + fi + AC_CHECK_PROG(OCAMLLEX,ocamllex,ocamllex,no) + if test "$OCAMLLEX" = no; then +- AC_MSG_ERROR([ocamllex not found. Mandatory to build Scicos.]) ++ AC_MSG_WARN([ocamllex not found. Mandatory to build the Scicos modelica compiler.]) + fi + AC_DEFINE([WITH_OCAML],[],[With OCAML]) +- OCAMLC=ocamlc +- OCAMLOPT=ocamlopt +- OCAMLDEP=ocamldep +- OCAMLYACC=ocamlyacc +- OCAMLLEX=ocamllex + + AC_SUBST(OCAMLC) + AC_SUBST(OCAMLOPT) --- scilab-5.1.1.orig/debian/patches/librarypath.diff +++ scilab-5.1.1/debian/patches/librarypath.diff @@ -0,0 +1,19 @@ +--- bin/scilab.orig 2009-02-13 10:12:45.000000000 +0100 ++++ bin/scilab 2009-02-13 10:14:06.000000000 +0100 +@@ -439,7 +439,7 @@ + #export PVM_ARCH + + SCILIB=$SCI/bin:$SCI/lib/scilab/:$SCI/lib64/scilab/ +-LD_LIBRARY_PATH=$SCILIB${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} ++#LD_LIBRARY_PATH=$SCILIB${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH} + + case $OS in + *darwin* | *Darwin*) # MacOS X +@@ -453,6 +453,7 @@ + *) + esac + ++LD_LIBRARY_PATH=/usr/lib/scilab/:/usr/lib64/scilab/:$LD_LIBRARY_PATH + + if test $SCIVERBOSE -ne 0; then + echo "LD_LIBRARY_PATH : $LD_LIBRARY_PATH"