From 16f3fe34e1f5c0d11cdf09fefeedee7a032401ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Brammer?= Date: Sun, 10 Mar 2013 22:16:50 +0100 Subject: [PATCH] Use correct exception when unable to compile a static proplist excNotFound is used to signal that the end of a list is reached. But these error conditions in C4Value::CompileFunc signal some logic error, not finding an end-of-list marker instead of a C4Value. --- src/script/C4Value.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/script/C4Value.cpp b/src/script/C4Value.cpp index 8089d1952..68581fa13 100644 --- a/src/script/C4Value.cpp +++ b/src/script/C4Value.cpp @@ -344,15 +344,15 @@ void C4Value::CompileFunc(StdCompiler *pComp, C4ValueNumbers * numbers) StdStrBuf s; pComp->Value(mkParAdapt(s, StdCompiler::RCT_ID)); if (!::ScriptEngine.GetGlobalConstant(s.getData(), this)) - pComp->excNotFound("static proplist %s", s.getData()); + pComp->excCorrupt("Cannot find global constant %s", s.getData()); while(pComp->Separator(StdCompiler::SEP_PART)) { C4PropList * p = getPropList(); if (!p) - pComp->excNotFound("static proplist is not a proplist anymore", s.getData()); + pComp->excCorrupt("static proplist %s is not a proplist anymore", s.getData()); pComp->Value(mkParAdapt(s, StdCompiler::RCT_ID)); if (!p->GetPropertyByS(::Strings.RegString(s), this)) - pComp->excNotFound("static proplist %s", s.getData()); + pComp->excCorrupt("Cannot find property %s in %s", s.getData(), GetDataString().getData()); } } break;