diff options
author | Eike Rathke <erack@redhat.com> | 2016-06-08 18:25:52 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-06-08 22:49:03 +0200 |
commit | 333b644d112d94e3d675e5915b8b1e535b0841e4 (patch) | |
tree | b568ff7f132f74cdc3850e3e91f392890f7bcb77 /formula | |
parent | e044eafc485ef29a68b3a8e0e7c75b372ebb1ac9 (diff) |
assert on "forgot to add a jump" for OpCode
Change-Id: I6c430b8a4079cd0d74e5c9e71a3f7b5b638d4ef5
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index ffd0f89a1a8b..2f641b21d0e4 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1547,7 +1547,8 @@ void FormulaCompiler::Factor() pFacToken->GetJump()[ 0 ] = 2; // if, behind break; default: - SAL_WARN( "formula.core", "FormulaCompiler::Factor: forgot to add a jump count case?"); + SAL_WARN("formula.core","Jump OpCode: " << eOp); + assert(!"FormulaCompiler::Factor: someone forgot to add a jump count case"); } eOp = NextToken(); if (eOp == ocOpen) @@ -1579,7 +1580,8 @@ void FormulaCompiler::Factor() break; default: nJumpMax = 0; - SAL_WARN( "formula.core", "FormulaCompiler::Factor: forgot to add a jump max case?"); + SAL_WARN("formula.core","Jump OpCode: " << eFacOpCode); + assert(!"FormulaCompiler::Factor: someone forgot to add a jump max case"); } short nJumpCount = 0; while ( (nJumpCount < (FORMULA_MAXJUMPCOUNT - 1)) && (eOp == ocSep) @@ -1617,7 +1619,8 @@ void FormulaCompiler::Factor() break; default: bLimitOk = false; - SAL_WARN( "formula.core", "FormulaCompiler::Factor: forgot to add a jump limit case?"); + SAL_WARN("formula.core","Jump OpCode: " << eFacOpCode); + assert(!"FormulaCompiler::Factor: someone forgot to add a jump limit case"); } if (bLimitOk) pFacToken->GetJump()[ 0 ] = nJumpCount; |