diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-10-12 22:02:15 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-10-14 15:37:17 +0200 |
commit | 176e8cf09a527438ec9b2b20ba2df23fa45226bc (patch) | |
tree | 76897d74143771a9ee9249c49bbe91da9ffa0433 /pyuno | |
parent | 328d6aae9e2b7a73f6672800629230f5b46d15b1 (diff) |
Use exception ctors, instead of setting members later
Avoids overwriting source location in message
Change-Id: Ia0290c7dd1ab3ea1357712a27ecab75c7b583dd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157893
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 799752fefee3..68b1ea508293 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -943,8 +943,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue, { buf.append( ", no traceback available\n" ); } - RuntimeException e; - e.Message = buf.makeStringAndClear(); + RuntimeException e(buf.makeStringAndClear()); #if OSL_DEBUG_LEVEL > 0 fprintf( stderr, "Python exception: %s\n", OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr() ); |