diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-09-30 20:47:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-03 10:12:41 +0200 |
commit | d9e322d60f65ff20631dab87baa5a2c7c71daaa2 (patch) | |
tree | d481e5a4728363b3866b5b5f6dbe64a2780b04a6 /include/svtools | |
parent | 64fc701388d1dcf8ae36ba2cc73eb5416a7c3374 (diff) |
replace ErrorInfo with simpler mechanism
Instead of returning ErrCode class everywhere, return a new
class ErrrCodeMsg, which combines an ErrCode with the other
parameters that are used to control the error reporting.
I do not change everything that uses ErrCode here, I started
from SfxBaseController/SfxMedium and worked outwards.
This change serves two purposes
(1) Replace the extremely whacky ErrorInfo mechanism we were
using to smuggle information into the error handler reporting
mechanism with a very straightforward approach of just combining it
into the error class.
(2) Allow us to capture the source location that produced the error,
which makes debugging the source of a problem soooo much easier.
Change-Id: I978b8f00c9851b41a216c7ebdef2ef94251d5519
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157440
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svtools')
-rw-r--r-- | include/svtools/ehdl.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/svtools/ehdl.hxx b/include/svtools/ehdl.hxx index 78bcf1723dfe..1f3b8d6cb17e 100644 --- a/include/svtools/ehdl.hxx +++ b/include/svtools/ehdl.hxx @@ -40,7 +40,7 @@ public: SfxErrorContext( sal_uInt16 nCtxIdP, OUString aArg1, weld::Window *pWin=nullptr, const ErrMsgCode* pIds = nullptr, const std::locale& rResLocaleP = SvtResLocale()); - bool GetString(ErrCode nErrId, OUString &rStr) override; + bool GetString(const ErrCodeMsg& nErrId, OUString &rStr) override; void SetExtendedMessage(ErrCode nErrId, const OUString& rStr); @@ -69,7 +69,7 @@ private: std::locale aResLocale; SVT_DLLPRIVATE static void GetClassString(ErrCodeClass lErrId, OUString &); - virtual bool CreateString(const ErrorInfo *, OUString &) const override; + virtual bool CreateString(const ErrCodeMsg&, OUString &) const override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |