diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-26 21:23:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-26 21:23:44 +0100 |
commit | 19882e0c7daeaa16cbdbca2838064d4ad8762649 (patch) | |
tree | 7b972ac60e85c0cea8cc9b3b42dd52a8fea41d75 | |
parent | 7eb92eea21e2af47b17c9901107f6e4833567928 (diff) |
lwp: convert hopeful asserts to exceptions
Change-Id: I3111929ea84aa8280607811c851d033156c65731
-rw-r--r-- | lotuswordpro/source/filter/lwpuidoc.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpuidoc.cxx b/lotuswordpro/source/filter/lwpuidoc.cxx index 1f45c1da0544..8e26b0daea37 100644 --- a/lotuswordpro/source/filter/lwpuidoc.cxx +++ b/lotuswordpro/source/filter/lwpuidoc.cxx @@ -92,11 +92,9 @@ void LwpNamedProperties::Read(LwpObjectStream *pStrm) { sal_uInt16 numEntries = pStrm->QuickReaduInt16(); - for (sal_uInt16 k = 0 ; k < numEntries; k++) - { - assert(false); - // TODO: Read each NamedProperties - } + if (numEntries) + throw std::runtime_error("TODO: Read each NamedProperties"); + pStrm->SkipExtra(); } /** @@ -121,8 +119,8 @@ void LwpMergeOptions::Read(LwpObjectStream *pStrm) m_nType = pStrm->QuickReaduInt16(); //Does not process m_nType here. Assume m_nType is 0. - // TODO: Read the CMergeDataFile - assert(m_nType==0); + if (m_nType != 0) + throw std::runtime_error("TODO: Read the CMergeDataFile"); m_nLastActionFlag = pStrm->QuickReaduInt16(); pStrm->SkipExtra(); |