[Gambas-user] Behaviour FINALLY CATCH
Michael N. Altrogge
mnaltrogge at web.de
Sun Apr 1 18:32:09 CEST 2018
I have a problem while using Finally / Catch ...
The finally part is ONLY executed if empty, even the entry is a comment.
This will NOT work:
/Public Function fncCheckDigit() As Integer
...
intZahl= intWert1 / 0
...
Finally ' Aufräumen nach Fehler
'Blah blah blubb
Catch ' Fehlerbahndlung
For Each strError In Error.Backtrace
Debug strError & gb.NewLine
Next
End
/
This will work:
/Public Function fncCheckDigit() As Integer
...
intZahl= intWert1 / 0
...
Finally ' Aufräumen nach Fehler
Catch ' Fehlerbahndlung
For Each strError In Error.Backtrace
Debug strError & gb.NewLine
Next
End
//
/Is this the expected behaviour?
/
/ [System]
Gambas=3.10.90
OperatingSystem=Linux
Kernel=4.13.0-37-generic
Architecture=x86_64
Distribution=Linux Mint 18.3 Sylvia
Desktop=CINNAMON
Theme=Gtk
Language=de_DE.UTF-8
Memory=3390M
[Libraries]
Cairo=libcairo.so.2.11400.6
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.6
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.803.0
GTK+2=libgtk-x11-2.0.so.0.2400.30
GTK+3=libgtk-3.so.0.1800.9
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.58.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.5.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6
[Environment]
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-zehciQsGYq,guid=37167106bf9fbdc4c1398cd45ac0eaa1
DEFAULTS_PATH=/usr/share/gconf/cinnamon.default.path
DESKTOP_AUTOSTART_ID=10bf101224edc7a02c152259241852434300000028010007
DESKTOP_SESSION=cinnamon
DISPLAY=:0
GB_GUI=gb.qt4
GDMSESSION=cinnamon
GDM_LANG=de_DE
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GTK_MODULES=gail:atk-bridge
GTK_OVERLAY_SCROLLING=1
HOME=<home>
LANG=de_DE.UTF-8
LANGUAGE=de_DE
LOGNAME=<user>
MANDATORY_PATH=/usr/share/gconf/cinnamon.mandatory.path
PATH=<home>/bin:<home>/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
PWD=<home>
QT_ACCESSIBILITY=1
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
QT_QPA_PLATFORMTHEME=qgnomeplatform
QT_STYLE_OVERRIDE=gtk
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/2801,unix/<hostname>:/tmp/.ICE-unix/2801
SHELL=/bin/bash
SHLVL=0
SSH_AGENT_PID=2860
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
TZ=:/etc/localtime
USER=<user>
XAUTHORITY=<home>/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg
XDG_CURRENT_DESKTOP=X-Cinnamon
XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:<home>/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/<user>
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP=cinnamon
XDG_SESSION_ID=c2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180401/40909308/attachment.html>
More information about the User
mailing list