diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-11 14:33:36 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-11 14:47:01 +0200 |
commit | 4e13a6911259d3d7d23b61cb76614263608bbd95 (patch) | |
tree | 7dcd289f650a0a179b6ab3fd2934dea2252c42d5 /idl/inc/database.hxx | |
parent | 489dd9027f53e6328f281bf087bb5a59246f9500 (diff) |
use exceptions for error handling in .SDI parsing
to simplify the normal control flow
Change-Id: If325ec0507a51d8e2d3340fc5b628bb75a078a44
Diffstat (limited to 'idl/inc/database.hxx')
-rw-r--r-- | idl/inc/database.hxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 3b7f15f02534..22d6b7801f4b 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -28,6 +28,7 @@ #include <rtl/ustring.hxx> #include <set> +#include <exception> class SvCommand; @@ -53,6 +54,16 @@ public: } }; +class SvParseException : public std::exception +{ +public: + SvIdlError aError; + SvParseException( SvTokenStream & rInStm, const OString& rError ); + SvParseException( const OString& rError, SvToken& rTok ); +}; + + + class SvIdlDataBase { bool bExport; @@ -106,10 +117,6 @@ public: SvRefMemberList<SvMetaObject *>& GetStack() { return aContextStack; } void Write(const OString& rText); - static void WriteError(const OString& rErrWrn, - const OString& rFileName, - const OString& rErrorText, - sal_uLong nRow = 0, sal_uLong nColumn = 0 ); void WriteError( SvTokenStream & rInStm ); void SetError( const OString& rError, SvToken& rTok ); void SetAndWriteError( SvTokenStream & rInStm, const OString& rError ); |