Description: see steps to reproduce Steps to Reproduce: 1. Open the attached ods file 2. Run the Main1() in Module1 3. Run the Main2() in Module2 Actual Results: Error Message on step 2 is: ----- BASIC runtime error. Variable not defined. ---- Error Message on step 3 is: ----- BASIC runtime error. '12' a ----- Expected Results: Error Message on step 3 should be: ----- BASIC runtime error. Variable not defined. ---- Reproducible: Always User Profile Reset: No Additional Info: Advantage: It's easier for StarBasic programmer to find out what the error is. Drawback: Programmer may not find out the name of variable that causes the error so easily. Source Code Pointer: https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=70519a43#3314 https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=70519a43#3450 rMsg.isEmpty() is false in the following code https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=70519a43#940
Created attachment 148873 [details] document to be used for STR
Version: 6.3.0.0.alpha0+ (x64) Build ID: 573a473275ad7c76d0cada9b7e73d4923e7a79d5 CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; TinderBox: Win-x86_64@42, Branch:master, Time: 2019-02-03_01:22:10 Locale: ja-JP (ja_JP); UI-Language: en-US Calc: threaded
Reproduced in Version: 6.3.0.0.alpha0+ Build ID: c196d70337f6b755cfc4c34beda05554c6fab114 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US Calc: threaded and Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
As a workaround I would propose that we just append the message at the end. This would lead to something like: Variable not defined: a
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/adb38e36e3944b47dbf278f882dd07cbabea5ced tdf#123144 - Always translate an error number to a vba error message It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.