aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-11-19 10:35:27 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-11-22 16:02:42 +0000
commitf83bd5cb4c9f2075b9e7a9dcf9046a9c6c489d7a (patch)
tree7658b89985420e9b2cec449585dfca8d65659b26 /sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
parentf9f80d765f44da153034e8c254e8842498511aa5 (diff)
signature: improve error handling for embedded applications
Entering something like """ mainWindow.setPointer(None) """ crashes in an old version of scriptableapplication, which shows an omission in the signature interface. The error shows up whenever a builtin module cannot be imported. The error does not show up in PySide 6, because the module is declared as a builtin via `PyImport_AppendInittab`. * add registration of AppLib as a builtin (5.15) * insert builtin modules per default into the mapping module * simple recovery if a module cannot be found in sys.modules [ChangeLog][shiboken6] Error handling was improved for embedded applications and builtin modules are trusted as valid modules. Change-Id: I722212a52a5e3aae924f0b965578485ecaf185a9 Fixes: PYSIDE-1710 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 2149a45fddeedea317dccbfe5e5b14e13888e5c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py')
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
index 0c1b72644..4c436eafd 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/errorhandler.py
@@ -104,8 +104,8 @@ def seterror_argument(args, func_name, info):
try:
func = eval(func_name, namespace)
except Exception as e:
- msg = f"Internal error evaluating {func_name}: " + str(e)
- return TypeError, msg
+ msg = f"Error evaluating `{func_name}`: {e}"
+ return type(e), msg
if info and type(info) is str:
err = TypeError
if info == "<":