summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp318
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.h2
-rw-r--r--xfa/fxfa/parser/xfa_object.h2
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp270
-rw-r--r--xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp42
-rw-r--r--xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp16
-rw-r--r--xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp8
7 files changed, 284 insertions, 374 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 41b2b93be2..a31a5a189a 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -503,8 +503,7 @@ void CXFA_FM2JSContext::Abs(CFXJSE_Value* pThis,
if (args.GetLength() != 1) {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Abs");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Abs");
return;
}
@@ -604,8 +603,7 @@ void CXFA_FM2JSContext::Ceil(CFXJSE_Value* pThis,
if (args.GetLength() != 1) {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Ceil");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Ceil");
return;
}
@@ -638,7 +636,7 @@ void CXFA_FM2JSContext::Count(CFXJSE_Value* pThis,
int32_t iLength = FXJSE_Value_ToInteger(lengthValue.get());
if (iLength <= 2) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return;
}
@@ -688,8 +686,7 @@ void CXFA_FM2JSContext::Floor(CFXJSE_Value* pThis,
if (args.GetLength() != 1) {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Floor");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Floor");
return;
}
@@ -722,7 +719,7 @@ void CXFA_FM2JSContext::Max(CFXJSE_Value* pThis,
FXJSE_Value_GetObjectProp(argValue.get(), "length", lengthValue.get());
int32_t iLength = FXJSE_Value_ToInteger(lengthValue.get());
if (iLength <= 2) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return;
}
@@ -804,7 +801,7 @@ void CXFA_FM2JSContext::Min(CFXJSE_Value* pThis,
FXJSE_Value_GetObjectProp(argValue.get(), "length", lengthValue.get());
int32_t iLength = FXJSE_Value_ToInteger(lengthValue.get());
if (iLength <= 2) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return;
}
@@ -874,8 +871,7 @@ void CXFA_FM2JSContext::Mod(CFXJSE_Value* pThis,
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
if (args.GetLength() != 2) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Mod");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Mod");
return;
}
@@ -891,12 +887,12 @@ void CXFA_FM2JSContext::Mod(CFXJSE_Value* pThis,
bool argTwoResult;
FX_DOUBLE dDivisor = ExtractDouble(pThis, argTwo.get(), &argTwoResult);
if (!argOneResult || !argTwoResult) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return;
}
if (dDivisor == 0.0) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_DIVIDE_ZERO);
+ pContext->ThrowException(XFA_IDS_DIVIDE_ZERO);
return;
}
@@ -912,8 +908,7 @@ void CXFA_FM2JSContext::Round(CFXJSE_Value* pThis,
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
int32_t argc = args.GetLength();
if (argc != 1 && argc != 2) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Round");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Round");
return;
}
@@ -926,7 +921,7 @@ void CXFA_FM2JSContext::Round(CFXJSE_Value* pThis,
bool dValueRet;
FX_DOUBLE dValue = ExtractDouble(pThis, argOne.get(), &dValueRet);
if (!dValueRet) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return;
}
@@ -941,7 +936,7 @@ void CXFA_FM2JSContext::Round(CFXJSE_Value* pThis,
bool dPrecisionRet;
FX_DOUBLE dPrecision = ExtractDouble(pThis, argTwo.get(), &dPrecisionRet);
if (!dPrecisionRet) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return;
}
@@ -980,7 +975,7 @@ void CXFA_FM2JSContext::Sum(CFXJSE_Value* pThis,
FXJSE_Value_GetObjectProp(argValue.get(), "length", lengthValue.get());
int32_t iLength = FXJSE_Value_ToInteger(lengthValue.get());
if (iLength <= 2) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return;
}
@@ -1045,8 +1040,7 @@ void CXFA_FM2JSContext::Date(CFXJSE_Value* pThis,
if (args.GetLength() != 0) {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Date");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Date");
return;
}
@@ -1074,8 +1068,7 @@ void CXFA_FM2JSContext::Date2Num(CFXJSE_Value* pThis,
if (argc <= 0 || argc >= 4) {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Date2Num");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Date2Num");
return;
}
@@ -1127,8 +1120,7 @@ void CXFA_FM2JSContext::DateFmt(CFXJSE_Value* pThis,
if (argc >= 3) {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Date2Num");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Date2Num");
return;
}
@@ -1167,8 +1159,8 @@ void CXFA_FM2JSContext::IsoDate2Num(CFXJSE_Value* pThis,
if (args.GetLength() != 1) {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"IsoDate2Num");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
+ L"IsoDate2Num");
return;
}
@@ -1191,8 +1183,8 @@ void CXFA_FM2JSContext::IsoTime2Num(CFXJSE_Value* pThis,
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
if (args.GetLength() != 1) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"IsoTime2Num");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
+ L"IsoTime2Num");
return;
}
@@ -1284,8 +1276,8 @@ void CXFA_FM2JSContext::LocalDateFmt(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"LocalDateFmt");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
+ L"LocalDateFmt");
}
}
@@ -1329,8 +1321,8 @@ void CXFA_FM2JSContext::LocalTimeFmt(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"LocalTimeFmt");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
+ L"LocalTimeFmt");
}
}
@@ -1478,8 +1470,7 @@ void CXFA_FM2JSContext::Num2Date(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Num2Date");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Num2Date");
}
}
@@ -1534,8 +1525,7 @@ void CXFA_FM2JSContext::Num2GMTime(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Num2GMTime");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Num2GMTime");
}
}
@@ -1590,8 +1580,7 @@ void CXFA_FM2JSContext::Num2Time(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Num2Time");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Num2Time");
}
}
@@ -1611,8 +1600,7 @@ void CXFA_FM2JSContext::Time(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Time");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Time");
}
}
@@ -1709,8 +1697,7 @@ void CXFA_FM2JSContext::Time2Num(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Time2Num");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Time2Num");
}
}
@@ -1754,8 +1741,7 @@ void CXFA_FM2JSContext::TimeFmt(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"TimeFmt");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"TimeFmt");
}
}
@@ -2570,7 +2556,7 @@ void CXFA_FM2JSContext::Apr(CFXJSE_Value* pThis,
nPeriods = ValueToDouble(pThis, argThree.get());
bFlags = ((nPrincipal <= 0) || (nPayment <= 0) || (nPeriods <= 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FX_DOUBLE r =
2 * (nPeriods * nPayment - nPrincipal) / (nPeriods * nPrincipal);
@@ -2605,8 +2591,7 @@ void CXFA_FM2JSContext::Apr(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Apr");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Apr");
}
}
@@ -2635,7 +2620,7 @@ void CXFA_FM2JSContext::CTerm(CFXJSE_Value* pThis,
nInitAmount = ValueToFloat(pThis, argThree.get());
bFlags = ((nRate <= 0) || (nFutureValue <= 0) || (nInitAmount <= 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FXJSE_Value_SetFloat(args.GetReturnValue(),
FXSYS_log((FX_FLOAT)(nFutureValue / nInitAmount)) /
@@ -2643,8 +2628,7 @@ void CXFA_FM2JSContext::CTerm(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"CTerm");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"CTerm");
}
}
@@ -2673,7 +2657,7 @@ void CXFA_FM2JSContext::FV(CFXJSE_Value* pThis,
nPeriod = ValueToDouble(pThis, argThree.get());
bFlags = ((nRate < 0) || (nPeriod <= 0) || (nAmount <= 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FX_DOUBLE dResult = 0;
if (!nRate) {
@@ -2689,8 +2673,7 @@ void CXFA_FM2JSContext::FV(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"FV");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"FV");
}
}
@@ -2728,7 +2711,7 @@ void CXFA_FM2JSContext::IPmt(CFXJSE_Value* pThis,
bFlags = ((nPrincpalAmount <= 0) || (nRate <= 0) || (nPayment <= 0) ||
(nFirstMonth < 0) || (nNumberOfMonths < 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FX_FLOAT fResult = 0;
FX_FLOAT nRateOfMonth = nRate / 12;
@@ -2761,8 +2744,7 @@ void CXFA_FM2JSContext::IPmt(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"IPmt");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"IPmt");
}
}
@@ -2786,7 +2768,7 @@ void CXFA_FM2JSContext::NPV(CFXJSE_Value* pThis,
FX_DOUBLE nRate = 0;
nRate = ValueToDouble(pThis, argValues[0].get());
if (nRate <= 0) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FX_DOUBLE* pData = FX_Alloc(FX_DOUBLE, argc - 1);
for (int32_t i = 1; i < argc; i++) {
@@ -2810,8 +2792,7 @@ void CXFA_FM2JSContext::NPV(CFXJSE_Value* pThis,
FXJSE_Value_SetNull(args.GetReturnValue());
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"NPV");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"NPV");
}
}
@@ -2840,7 +2821,7 @@ void CXFA_FM2JSContext::Pmt(CFXJSE_Value* pThis,
nPeriods = ValueToFloat(pThis, argThree.get());
bFlags = ((nPrincipal <= 0) || (nRate <= 0) || (nPeriods <= 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FX_FLOAT nSum = 0;
FX_FLOAT nTmp = 1 + nRate;
@@ -2853,8 +2834,7 @@ void CXFA_FM2JSContext::Pmt(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Pmt");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Pmt");
}
}
@@ -2892,7 +2872,7 @@ void CXFA_FM2JSContext::PPmt(CFXJSE_Value* pThis,
bFlags = ((nPrincpalAmount <= 0) || (nRate <= 0) || (nPayment <= 0) ||
(nFirstMonth < 0) || (nNumberOfMonths < 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
int32_t iEnd = (int32_t)(nFirstMonth + nNumberOfMonths - 1);
FX_FLOAT nSum = 0;
@@ -2921,13 +2901,12 @@ void CXFA_FM2JSContext::PPmt(CFXJSE_Value* pThis,
}
FXJSE_Value_SetFloat(args.GetReturnValue(), nSum);
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
}
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"PPmt");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"PPmt");
}
}
@@ -2956,7 +2935,7 @@ void CXFA_FM2JSContext::PV(CFXJSE_Value* pThis,
nPeriod = ValueToDouble(pThis, argThree.get());
bFlags = ((nAmount <= 0) || (nRate < 0) || (nPeriod <= 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FX_DOUBLE nTemp = 1;
for (int32_t i = 0; i < nPeriod; ++i) {
@@ -2968,8 +2947,7 @@ void CXFA_FM2JSContext::PV(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"PV");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"PV");
}
}
@@ -2998,7 +2976,7 @@ void CXFA_FM2JSContext::Rate(CFXJSE_Value* pThis,
nTotalNumber = ValueToFloat(pThis, argThree.get());
bFlags = ((nFuture <= 0) || (nPresent < 0) || (nTotalNumber <= 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FXJSE_Value_SetFloat(args.GetReturnValue(),
(FXSYS_pow((FX_FLOAT)(nFuture / nPresent),
@@ -3007,8 +2985,7 @@ void CXFA_FM2JSContext::Rate(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Rate");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Rate");
}
}
@@ -3037,7 +3014,7 @@ void CXFA_FM2JSContext::Term(CFXJSE_Value* pThis,
nFuture = ValueToFloat(pThis, argThree.get());
bFlags = ((nMount <= 0) || (nRate <= 0) || (nFuture <= 0));
if (bFlags) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
FXJSE_Value_SetFloat(
args.GetReturnValue(),
@@ -3046,8 +3023,7 @@ void CXFA_FM2JSContext::Term(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Term");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Term");
}
}
@@ -3134,8 +3110,7 @@ void CXFA_FM2JSContext::Choose(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Choose");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Choose");
}
}
@@ -3150,8 +3125,7 @@ void CXFA_FM2JSContext::Exists(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Exists");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Exists");
}
}
@@ -3175,8 +3149,7 @@ void CXFA_FM2JSContext::HasValue(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"HasValue");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"HasValue");
}
}
@@ -3204,8 +3177,7 @@ void CXFA_FM2JSContext::Oneof(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Oneof");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Oneof");
}
}
@@ -3243,8 +3215,7 @@ void CXFA_FM2JSContext::Within(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Within");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Within");
}
}
@@ -3264,8 +3235,7 @@ void CXFA_FM2JSContext::If(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"If");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"If");
}
}
@@ -3301,8 +3271,7 @@ void CXFA_FM2JSContext::Eval(CFXJSE_Value* pThis,
FXJSE_Context_Release(pContext);
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Eval");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Eval");
}
}
@@ -3338,7 +3307,7 @@ void CXFA_FM2JSContext::Ref(CFXJSE_Value* pThis,
FXJSE_Value_GetObjectPropByIdx(argOne.get(), 1, propertyValue.get());
FXJSE_Value_GetObjectPropByIdx(argOne.get(), 2, jsObjectValue.get());
if (FXJSE_Value_IsNull(jsObjectValue.get())) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else if (FXJSE_Value_IsNull(propertyValue.get()) &&
(!FXJSE_Value_IsNull(jsObjectValue.get()))) {
CFXJSE_Value* rgValues[3];
@@ -3353,7 +3322,7 @@ void CXFA_FM2JSContext::Ref(CFXJSE_Value* pThis,
delete rgValues[i];
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
}
} else if (FXJSE_Value_IsObject(argOne.get())) {
CFXJSE_Value* rgValues[3];
@@ -3372,11 +3341,10 @@ void CXFA_FM2JSContext::Ref(CFXJSE_Value* pThis,
FXJSE_Value_IsNumber(argOne.get())) {
FXJSE_Value_Set(args.GetReturnValue(), argOne.get());
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Ref");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Ref");
}
}
@@ -3493,8 +3461,7 @@ void CXFA_FM2JSContext::UnitType(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"UnitType");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"UnitType");
}
}
@@ -3651,8 +3618,7 @@ void CXFA_FM2JSContext::UnitValue(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"UnitValue");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"UnitValue");
}
}
@@ -3680,8 +3646,7 @@ void CXFA_FM2JSContext::At(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"At");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"At");
}
}
@@ -3713,8 +3678,7 @@ void CXFA_FM2JSContext::Concat(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Concat");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Concat");
}
}
@@ -3757,8 +3721,7 @@ void CXFA_FM2JSContext::Decode(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Decode");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Decode");
}
}
@@ -4033,8 +3996,7 @@ void CXFA_FM2JSContext::Encode(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Encode");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Encode");
}
}
@@ -4410,8 +4372,7 @@ void CXFA_FM2JSContext::Format(CFXJSE_Value* pThis,
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Format");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Format");
}
}
@@ -4442,8 +4403,7 @@ void CXFA_FM2JSContext::Left(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Left");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Left");
}
}
@@ -4463,8 +4423,7 @@ void CXFA_FM2JSContext::Len(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Len");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Len");
}
}
@@ -4508,8 +4467,7 @@ void CXFA_FM2JSContext::Lower(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Lower");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Lower");
}
}
@@ -4531,8 +4489,7 @@ void CXFA_FM2JSContext::Ltrim(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Ltrim");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Ltrim");
}
}
@@ -4672,8 +4629,7 @@ void CXFA_FM2JSContext::Parse(CFXJSE_Value* pThis,
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Parse");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Parse");
}
}
@@ -4734,8 +4690,7 @@ void CXFA_FM2JSContext::Replace(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Replace");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Replace");
}
}
@@ -4766,8 +4721,7 @@ void CXFA_FM2JSContext::Right(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Right");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Right");
}
}
@@ -4789,8 +4743,7 @@ void CXFA_FM2JSContext::Rtrim(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Rtrim");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Rtrim");
}
}
@@ -4818,8 +4771,7 @@ void CXFA_FM2JSContext::Space(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Space");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Space");
}
}
@@ -4938,8 +4890,7 @@ void CXFA_FM2JSContext::Str(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Str");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Str");
}
}
@@ -4997,8 +4948,7 @@ void CXFA_FM2JSContext::Stuff(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Stuff");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Stuff");
}
}
@@ -5042,8 +4992,7 @@ void CXFA_FM2JSContext::Substr(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Substr");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Substr");
}
}
@@ -5066,8 +5015,7 @@ void CXFA_FM2JSContext::Uuid(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Uuid");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Uuid");
}
}
@@ -5111,8 +5059,7 @@ void CXFA_FM2JSContext::Upper(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Upper");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Upper");
}
}
@@ -5166,8 +5113,7 @@ void CXFA_FM2JSContext::WordNum(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"WordNum");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"WordNum");
}
}
@@ -5401,8 +5347,7 @@ void CXFA_FM2JSContext::Get(CFXJSE_Value* pThis,
pFile->Release();
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Get");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Get");
}
}
@@ -5457,11 +5402,10 @@ void CXFA_FM2JSContext::Post(CFXJSE_Value* pThis,
FX_UTF8Encode(decodedResponse.c_str(), decodedResponse.GetLength())
.AsStringC());
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_SERVER_DENY);
+ pContext->ThrowException(XFA_IDS_SERVER_DENY);
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Post");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Post");
}
}
@@ -5500,11 +5444,10 @@ void CXFA_FM2JSContext::Put(CFXJSE_Value* pThis,
if (bFlags) {
FXJSE_Value_SetUTF8String(args.GetReturnValue(), "");
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_SERVER_DENY);
+ pContext->ThrowException(XFA_IDS_SERVER_DENY);
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Put");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Put");
}
}
@@ -5531,7 +5474,7 @@ void CXFA_FM2JSContext::assign_value_operator(CFXJSE_Value* pThis,
FXJSE_Value_GetObjectPropByIdx(lValue.get(), i, jsObjectValue.get());
bSetStatus = SetObjectDefaultValue(jsObjectValue.get(), rValue.get());
if (!bSetStatus) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_NOT_DEFAUL_VALUE);
+ pContext->ThrowException(XFA_IDS_NOT_DEFAUL_VALUE);
break;
}
}
@@ -5547,12 +5490,12 @@ void CXFA_FM2JSContext::assign_value_operator(CFXJSE_Value* pThis,
} else if (FXJSE_Value_IsObject(lValue.get())) {
bSetStatus = SetObjectDefaultValue(lValue.get(), rValue.get());
if (!bSetStatus) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_NOT_DEFAUL_VALUE);
+ pContext->ThrowException(XFA_IDS_NOT_DEFAUL_VALUE);
}
}
FXJSE_Value_Set(args.GetReturnValue(), rValue.get());
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5574,7 +5517,7 @@ void CXFA_FM2JSContext::logical_or_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5596,7 +5539,7 @@ void CXFA_FM2JSContext::logical_and_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5635,7 +5578,7 @@ void CXFA_FM2JSContext::equality_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5673,7 +5616,7 @@ void CXFA_FM2JSContext::notequality_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5735,7 +5678,7 @@ void CXFA_FM2JSContext::less_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5770,7 +5713,7 @@ void CXFA_FM2JSContext::lessequal_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5801,7 +5744,7 @@ void CXFA_FM2JSContext::greater_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5836,7 +5779,7 @@ void CXFA_FM2JSContext::greaterequal_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5858,7 +5801,7 @@ void CXFA_FM2JSContext::plus_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5880,7 +5823,7 @@ void CXFA_FM2JSContext::minus_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5902,7 +5845,7 @@ void CXFA_FM2JSContext::multiple_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5922,13 +5865,13 @@ void CXFA_FM2JSContext::divide_operator(CFXJSE_Value* pThis,
FX_DOUBLE first = ValueToDouble(pThis, argFirst.get());
FX_DOUBLE second = ValueToDouble(pThis, argSecond.get());
if (second == 0.0) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_DIVIDE_ZERO);
+ pContext->ThrowException(XFA_IDS_DIVIDE_ZERO);
} else {
FXJSE_Value_SetDouble(args.GetReturnValue(), first / second);
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5947,7 +5890,7 @@ void CXFA_FM2JSContext::positive_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5966,7 +5909,7 @@ void CXFA_FM2JSContext::negative_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -5985,7 +5928,7 @@ void CXFA_FM2JSContext::logical_not_operator(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -6065,9 +6008,9 @@ void CXFA_FM2JSContext::dot_accessor(CFXJSE_Value* pThis,
CFX_WideString::FromUTF8(szName.AsStringC());
CFX_WideString wsSomExpression =
CFX_WideString::FromUTF8(szSomExp.AsStringC());
- pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
- wsPropertyName.c_str(),
- wsSomExpression.c_str());
+ pContext->ThrowException(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
+ wsPropertyName.c_str(),
+ wsSomExpression.c_str());
}
for (int32_t i = 0; i < iLength - 2; i++) {
for (int32_t j = 0; j < iSizes[i]; j++)
@@ -6128,13 +6071,13 @@ void CXFA_FM2JSContext::dot_accessor(CFXJSE_Value* pThis,
CFX_WideString::FromUTF8(szName.AsStringC());
CFX_WideString wsSomExpression =
CFX_WideString::FromUTF8(szSomExp.AsStringC());
- pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
- wsPropertyName.c_str(),
- wsSomExpression.c_str());
+ pContext->ThrowException(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
+ wsPropertyName.c_str(),
+ wsSomExpression.c_str());
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -6211,9 +6154,9 @@ void CXFA_FM2JSContext::dotdot_accessor(CFXJSE_Value* pThis,
CFX_WideString::FromUTF8(szName.AsStringC());
CFX_WideString wsSomExpression =
CFX_WideString::FromUTF8(szSomExp.AsStringC());
- pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
- wsPropertyName.c_str(),
- wsSomExpression.c_str());
+ pContext->ThrowException(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
+ wsPropertyName.c_str(),
+ wsSomExpression.c_str());
}
for (int32_t i = 0; i < iLength - 2; i++) {
for (int32_t j = 0; j < iSizes[i]; j++)
@@ -6272,13 +6215,13 @@ void CXFA_FM2JSContext::dotdot_accessor(CFXJSE_Value* pThis,
CFX_WideString::FromUTF8(szName.AsStringC());
CFX_WideString wsSomExpression =
CFX_WideString::FromUTF8(szSomExp.AsStringC());
- pContext->ThrowScriptErrorMessage(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
- wsPropertyName.c_str(),
- wsSomExpression.c_str());
+ pContext->ThrowException(XFA_IDS_ACCESS_PROPERTY_IN_NOT_OBJECT,
+ wsPropertyName.c_str(),
+ wsSomExpression.c_str());
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -6293,7 +6236,7 @@ void CXFA_FM2JSContext::eval_translation(CFXJSE_Value* pThis,
CFX_ByteString argString;
ValueToUTF8String(argOne.get(), argString);
if (argString.IsEmpty()) {
- pContext->ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ pContext->ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
} else {
CFX_WideString scriptString =
CFX_WideString::FromUTF8(argString.AsStringC());
@@ -6308,12 +6251,11 @@ void CXFA_FM2JSContext::eval_translation(CFXJSE_Value* pThis,
FX_UTF8Encode(javaScript.c_str(), javaScript.GetLength())
.AsStringC());
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"Eval");
+ pContext->ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"Eval");
}
}
@@ -6371,7 +6313,7 @@ void CXFA_FM2JSContext::get_fm_value(CFXJSE_Value* pThis,
FXJSE_Value_Set(args.GetReturnValue(), argOne.get());
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -6397,7 +6339,7 @@ void CXFA_FM2JSContext::get_fm_jsobj(CFXJSE_Value* pThis,
} else {
CXFA_FM2JSContext* pContext =
static_cast<CXFA_FM2JSContext*>(FXJSE_Value_ToObject(pThis, nullptr));
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -6436,7 +6378,7 @@ void CXFA_FM2JSContext::fm_var_filter(CFXJSE_Value* pThis,
if (!FXJSE_Value_IsNull(objectValue.get())) {
FXJSE_Value_Set(args.GetReturnValue(), argOne.get());
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
} else {
std::unique_ptr<CFXJSE_Value> simpleValue =
@@ -6449,7 +6391,7 @@ void CXFA_FM2JSContext::fm_var_filter(CFXJSE_Value* pThis,
FXJSE_Value_Set(args.GetReturnValue(), simpleValue.get());
}
} else {
- pContext->ThrowScriptErrorMessage(XFA_IDS_COMPILER_ERROR);
+ pContext->ThrowException(XFA_IDS_COMPILER_ERROR);
}
}
@@ -7085,7 +7027,7 @@ void CXFA_FM2JSContext::GlobalPropertyGetter(CFXJSE_Value* pValue) {
FXJSE_Value_Set(pValue, m_pValue.get());
}
-void CXFA_FM2JSContext::ThrowScriptErrorMessage(int32_t iStringID, ...) {
+void CXFA_FM2JSContext::ThrowException(int32_t iStringID, ...) {
IXFA_AppProvider* pAppProvider = m_pDocument->GetNotify()->GetAppProvider();
ASSERT(pAppProvider);
CFX_WideString wsFormat;
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
index 3d54eaf93f..92c819b16e 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.h
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.h
@@ -449,7 +449,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject {
private:
v8::Isolate* GetScriptRuntime() const { return m_pIsolate; }
CXFA_Document* GetDocument() const { return m_pDocument; }
- void ThrowScriptErrorMessage(int32_t iStringID, ...);
+ void ThrowException(int32_t iStringID, ...);
v8::Isolate* m_pIsolate;
CFXJSE_Class* m_pFMClass;
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h
index 17b624fb13..c4eaa4cc60 100644
--- a/xfa/fxfa/parser/xfa_object.h
+++ b/xfa/fxfa/parser/xfa_object.h
@@ -86,7 +86,7 @@ class CXFA_Object : public CFXJSE_HostObject {
void Script_ObjectClass_ClassName(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute);
- void ThrowScriptErrorMessage(int32_t iStringID, ...);
+ void ThrowException(int32_t iStringID, ...);
protected:
CXFA_Document* const m_pDocument;
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index eed103643b..f3bb4fefb2 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -90,11 +90,11 @@ void CXFA_Object::Script_ObjectClass_ClassName(CFXJSE_Value* pValue,
pValue,
FX_UTF8Encode(className.c_str(), className.GetLength()).AsStringC());
} else {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
}
}
-void CXFA_Object::ThrowScriptErrorMessage(int32_t iStringID, ...) {
+void CXFA_Object::ThrowException(int32_t iStringID, ...) {
IXFA_AppProvider* pAppProvider = m_pDocument->GetNotify()->GetAppProvider();
ASSERT(pAppProvider);
CFX_WideString wsFormat;
@@ -628,7 +628,7 @@ void CXFA_Node::SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode) {
void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resolveNode");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resolveNode");
return;
}
CFX_WideString wsExpression =
@@ -669,8 +669,7 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"resolveNodes");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resolveNodes");
return;
}
CFX_WideString wsExpression =
@@ -724,7 +723,7 @@ void CXFA_Node::Script_TreeClass_All(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
uint32_t dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL;
CFX_WideString wsName;
@@ -759,7 +758,7 @@ void CXFA_Node::Script_TreeClass_ClassAll(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
uint32_t dwFlag = XFA_RESOLVENODE_Siblings | XFA_RESOLVENODE_ALL;
CFX_WideStringC wsName;
@@ -773,7 +772,7 @@ void CXFA_Node::Script_TreeClass_Parent(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
CXFA_Node* pParent = GetNodeItem(XFA_NODEITEM_Parent);
if (pParent) {
@@ -789,7 +788,7 @@ void CXFA_Node::Script_TreeClass_Index(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting)
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
else
FXJSE_Value_SetInteger(pValue, GetNodeSameNameIndex());
}
@@ -798,7 +797,7 @@ void CXFA_Node::Script_TreeClass_ClassIndex(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting)
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
else
FXJSE_Value_SetInteger(pValue, GetNodeSameClassIndex());
}
@@ -807,7 +806,7 @@ void CXFA_Node::Script_TreeClass_SomExpression(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
CFX_WideString wsSOMExpression;
GetSOMExpression(wsSOMExpression);
@@ -819,7 +818,7 @@ void CXFA_Node::Script_TreeClass_SomExpression(CFXJSE_Value* pValue,
void CXFA_Node::Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"applyXSL");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"applyXSL");
return;
}
CFX_WideString wsExpression =
@@ -832,7 +831,7 @@ void CXFA_Node::Script_NodeClass_ApplyXSL(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"assignNode");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"assignNode");
return;
}
CFX_WideString wsExpression;
@@ -856,7 +855,7 @@ void CXFA_Node::Script_NodeClass_AssignNode(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_NodeClass_Clone(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clone");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clone");
return;
}
bool bClone = !!pArguments->GetInt32(0);
@@ -869,8 +868,7 @@ void CXFA_Node::Script_NodeClass_Clone(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"getAttribute");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getAttribute");
return;
}
CFX_WideString wsExpression =
@@ -885,7 +883,7 @@ void CXFA_Node::Script_NodeClass_GetAttribute(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_NodeClass_GetElement(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 2) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getElement");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getElement");
return;
}
CFX_WideString wsExpression;
@@ -905,8 +903,7 @@ void CXFA_Node::Script_NodeClass_IsPropertySpecified(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"isPropertySpecified");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isPropertySpecified");
return;
}
CFX_WideString wsExpression;
@@ -943,7 +940,7 @@ void CXFA_Node::Script_NodeClass_IsPropertySpecified(
void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"loadXML");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"loadXML");
return;
}
CFX_WideString wsExpression;
@@ -1065,13 +1062,13 @@ void CXFA_Node::Script_NodeClass_SaveFilteredXML(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"saveXML");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"saveXML");
return;
}
bool bPrettyMode = false;
if (iLength == 1) {
if (pArguments->GetUTF8String(0) != "pretty") {
- ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return;
}
bPrettyMode = true;
@@ -1119,8 +1116,7 @@ void CXFA_Node::Script_NodeClass_SaveXML(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 2) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"setAttribute");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setAttribute");
return;
}
CFX_WideString wsAttributeValue =
@@ -1133,7 +1129,7 @@ void CXFA_Node::Script_NodeClass_SetAttribute(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_NodeClass_SetElement(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1 && iLength != 2) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setElement");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setElement");
return;
}
CXFA_Node* pNode = nullptr;
@@ -1151,7 +1147,7 @@ void CXFA_Node::Script_NodeClass_Ns(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
CFX_WideString wsNameSpace;
TryNamespace(wsNameSpace);
@@ -1163,7 +1159,7 @@ void CXFA_Node::Script_NodeClass_Model(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
FXJSE_Value_Set(pValue, m_pDocument->GetScriptContext()->GetJSValueFromMap(
GetModelNode()));
@@ -1174,7 +1170,7 @@ void CXFA_Node::Script_NodeClass_IsContainer(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting)
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
else
FXJSE_Value_SetBoolean(pValue, IsContainerNode());
}
@@ -1183,7 +1179,7 @@ void CXFA_Node::Script_NodeClass_IsNull(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
if (GetClassID() == XFA_ELEMENT_Subform) {
FXJSE_Value_SetBoolean(pValue, FALSE);
@@ -1198,7 +1194,7 @@ void CXFA_Node::Script_NodeClass_OneOfChild(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
CXFA_NodeArray properts;
int32_t iSize = GetNodeList(properts, XFA_NODEFILTER_OneOfProperty);
@@ -1224,8 +1220,7 @@ void CXFA_Node::Script_ModelClass_CreateNode(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_ModelClass_IsCompatibleNS(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"isCompatibleNS");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isCompatibleNS");
return;
}
CFX_WideString wsNameSpace;
@@ -1261,7 +1256,7 @@ void CXFA_Node::Script_Attribute_IntegerRead(CFXJSE_Value* pValue,
if (!bSetting) {
FXJSE_Value_SetInteger(pValue, GetInteger(eAttribute));
} else {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
}
}
void CXFA_Node::Script_Attribute_BOOL(CFXJSE_Value* pValue,
@@ -1279,7 +1274,7 @@ void CXFA_Node::Script_Attribute_BOOLRead(CFXJSE_Value* pValue,
if (!bSetting) {
FXJSE_Value_SetUTF8String(pValue, GetBoolean(eAttribute) ? "1" : "0");
} else {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
}
}
@@ -1513,7 +1508,7 @@ void CXFA_Node::Script_Attribute_StringRead(CFXJSE_Value* pValue,
pValue,
FX_UTF8Encode(wsValue.c_str(), wsValue.GetLength()).AsStringC());
} else {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
}
}
void CXFA_Node::Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments) {
@@ -1521,14 +1516,14 @@ void CXFA_Node::Script_WsdlConnection_Execute(CFXJSE_Arguments* pArguments) {
if ((argc == 0) || (argc == 1)) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), FALSE);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execute");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execute");
}
}
void CXFA_Node::Script_Delta_Restore(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"restore");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"restore");
}
}
void CXFA_Node::Script_Delta_CurrentValue(CFXJSE_Value* pValue,
@@ -1606,7 +1601,7 @@ void CXFA_Node::Script_Field_Length(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
CXFA_WidgetData* pWidgetData = GetWidgetData();
if (!pWidgetData) {
@@ -1685,7 +1680,7 @@ void CXFA_Node::Script_Som_DefaultValue_Read(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
CFX_WideString content = GetScriptContent(TRUE);
@@ -1904,7 +1899,7 @@ void CXFA_Node::Script_Som_DataNode(CFXJSE_Value* pValue,
FXJSE_Value_SetNull(pValue);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
}
}
void CXFA_Node::Script_Draw_DefaultValue(CFXJSE_Value* pValue,
@@ -2109,7 +2104,7 @@ void CXFA_Node::Script_Field_ParentSubform(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
} else {
FXJSE_Value_SetNull(pValue);
}
@@ -2151,7 +2146,7 @@ void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments) {
((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
}
}
void CXFA_Node::Script_Field_ExecInitialize(CFXJSE_Arguments* pArguments) {
@@ -2163,14 +2158,13 @@ void CXFA_Node::Script_Field_ExecInitialize(CFXJSE_Arguments* pArguments) {
}
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Initialize, FALSE, FALSE);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execInitialize");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execInitialize");
}
}
void CXFA_Node::Script_Field_DeleteItem(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"deleteItem");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"deleteItem");
return;
}
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2187,7 +2181,7 @@ void CXFA_Node::Script_Field_DeleteItem(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getSaveItem");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getSaveItem");
return;
}
int32_t iIndex = pArguments->GetInt32(0);
@@ -2213,7 +2207,7 @@ void CXFA_Node::Script_Field_GetSaveItem(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_Field_BoundItem(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"boundItem");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"boundItem");
return;
}
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2232,8 +2226,7 @@ void CXFA_Node::Script_Field_BoundItem(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_Field_GetItemState(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"getItemState");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getItemState");
return;
}
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2256,16 +2249,14 @@ void CXFA_Node::Script_Field_ExecCalculate(CFXJSE_Arguments* pArguments) {
}
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Calculate, FALSE, FALSE);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execCalculate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execCalculate");
}
}
void CXFA_Node::Script_Field_SetItems(CFXJSE_Arguments* pArguments) {}
void CXFA_Node::Script_Field_GetDisplayItem(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"getDisplayItem");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getDisplayItem");
return;
}
int32_t iIndex = pArguments->GetInt32(0);
@@ -2291,8 +2282,7 @@ void CXFA_Node::Script_Field_GetDisplayItem(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_Field_SetItemState(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 2) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"setItemState");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setItemState");
return;
}
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2310,7 +2300,7 @@ void CXFA_Node::Script_Field_SetItemState(CFXJSE_Arguments* pArguments) {
void CXFA_Node::Script_Field_AddItem(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 2) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addItem");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addItem");
return;
}
CXFA_WidgetData* pWidgetData = GetWidgetData();
@@ -2342,8 +2332,7 @@ void CXFA_Node::Script_Field_ExecValidate(CFXJSE_Arguments* pArguments) {
((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execValidate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
}
}
void CXFA_Node::Script_ExclGroup_ErrorText(CFXJSE_Value* pValue,
@@ -2351,7 +2340,7 @@ void CXFA_Node::Script_ExclGroup_ErrorText(CFXJSE_Value* pValue,
XFA_ATTRIBUTE eAttribute) {
if (!bSetting) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
}
}
void CXFA_Node::Script_ExclGroup_DefaultAndRawValue(CFXJSE_Value* pValue,
@@ -2388,15 +2377,14 @@ void CXFA_Node::Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments) {
CFX_WideString::FromUTF8(eventString.AsStringC()).AsStringC(),
XFA_ELEMENT_ExclGroup);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
}
}
void CXFA_Node::Script_ExclGroup_SelectedMember(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc < 0 || argc > 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"selectedMember");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"selectedMember");
return;
}
@@ -2433,8 +2421,7 @@ void CXFA_Node::Script_ExclGroup_ExecInitialize(CFXJSE_Arguments* pArguments) {
}
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Initialize);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execInitialize");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execInitialize");
}
}
void CXFA_Node::Script_ExclGroup_ExecCalculate(CFXJSE_Arguments* pArguments) {
@@ -2446,8 +2433,7 @@ void CXFA_Node::Script_ExclGroup_ExecCalculate(CFXJSE_Arguments* pArguments) {
}
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Calculate);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execCalculate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execCalculate");
}
}
void CXFA_Node::Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments) {
@@ -2462,8 +2448,7 @@ void CXFA_Node::Script_ExclGroup_ExecValidate(CFXJSE_Arguments* pArguments) {
((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execValidate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
}
}
static CXFA_Node* XFA_ScriptInstanceManager_GetItem(CXFA_Node* pInstMgrNode,
@@ -2560,7 +2545,7 @@ void CXFA_Node::Script_Subform_InstanceManager(CFXJSE_Value* pValue,
FXJSE_Value_SetNull(pValue);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
}
}
void CXFA_Node::Script_Subform_Locale(CFXJSE_Value* pValue,
@@ -2587,7 +2572,7 @@ void CXFA_Node::Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments) {
CFX_WideString::FromUTF8(eventString.AsStringC()).AsStringC(),
XFA_ELEMENT_Subform);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent");
}
}
void CXFA_Node::Script_Subform_ExecInitialize(CFXJSE_Arguments* pArguments) {
@@ -2599,8 +2584,7 @@ void CXFA_Node::Script_Subform_ExecInitialize(CFXJSE_Arguments* pArguments) {
}
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Initialize);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execInitialize");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execInitialize");
}
}
void CXFA_Node::Script_Subform_ExecCalculate(CFXJSE_Arguments* pArguments) {
@@ -2612,8 +2596,7 @@ void CXFA_Node::Script_Subform_ExecCalculate(CFXJSE_Arguments* pArguments) {
}
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Calculate);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execCalculate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execCalculate");
}
}
void CXFA_Node::Script_Subform_ExecValidate(CFXJSE_Arguments* pArguments) {
@@ -2628,16 +2611,14 @@ void CXFA_Node::Script_Subform_ExecValidate(CFXJSE_Arguments* pArguments) {
((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execValidate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
}
}
void CXFA_Node::Script_Subform_GetInvalidObjects(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"getInvalidObjects");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getInvalidObjects");
}
}
int32_t CXFA_Node::Subform_and_SubformSet_InstanceIndex() {
@@ -2658,7 +2639,7 @@ void CXFA_Node::Script_Template_FormNodes(CFXJSE_Arguments* pArguments) {
if (argc == 1) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"formNodes");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"formNodes");
}
}
void CXFA_Node::Script_Template_Remerge(CFXJSE_Arguments* pArguments) {
@@ -2666,7 +2647,7 @@ void CXFA_Node::Script_Template_Remerge(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
m_pDocument->DoDataRemerge(TRUE);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"remerge");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"remerge");
}
}
void CXFA_Node::Script_Template_ExecInitialize(CFXJSE_Arguments* pArguments) {
@@ -2679,8 +2660,7 @@ void CXFA_Node::Script_Template_ExecInitialize(CFXJSE_Arguments* pArguments) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execInitialize");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execInitialize");
}
}
void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) {
@@ -2716,8 +2696,8 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) {
pArguments->GetReturnValue(),
m_pDocument->GetScriptContext()->GetJSValueFromMap(pNewNode));
} else {
- ThrowScriptErrorMessage(XFA_IDS_NOT_HAVE_PROPERTY, strTagName.c_str(),
- L"name");
+ ThrowException(XFA_IDS_NOT_HAVE_PROPERTY, strTagName.c_str(),
+ L"name");
}
} else {
FXJSE_Value_Set(
@@ -2726,14 +2706,14 @@ void CXFA_Node::Script_Template_CreateNode(CFXJSE_Arguments* pArguments) {
}
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"createNode");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"createNode");
}
}
void CXFA_Node::Script_Template_Recalculate(CFXJSE_Arguments* pArguments) {
if (pArguments->GetLength() == 1) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"recalculate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"recalculate");
}
}
void CXFA_Node::Script_Template_ExecCalculate(CFXJSE_Arguments* pArguments) {
@@ -2746,8 +2726,7 @@ void CXFA_Node::Script_Template_ExecCalculate(CFXJSE_Arguments* pArguments) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execCalculate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execCalculate");
}
}
void CXFA_Node::Script_Template_ExecValidate(CFXJSE_Arguments* pArguments) {
@@ -2760,8 +2739,7 @@ void CXFA_Node::Script_Template_ExecValidate(CFXJSE_Arguments* pArguments) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execValidate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
}
}
void CXFA_Node::Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments) {
@@ -2774,14 +2752,14 @@ void CXFA_Node::Script_Manifest_Evaluate(CFXJSE_Arguments* pArguments) {
FXJSE_Value_SetBoolean(pArguments->GetReturnValue(), TRUE);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"evaluate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"evaluate");
}
}
void CXFA_Node::Script_InstanceManager_Max(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
CXFA_Occur nodeOccur(GetOccurNode());
@@ -2791,7 +2769,7 @@ void CXFA_Node::Script_InstanceManager_Min(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
CXFA_Occur nodeOccur(GetOccurNode());
@@ -3113,13 +3091,13 @@ void CXFA_Node::Script_InstanceManager_RemoveInstance(
int32_t iIndex = pArguments->GetInt32(0);
int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
if (iIndex < 0 || iIndex >= iCount) {
- ThrowScriptErrorMessage(XFA_IDS_INDEX_OUT_OF_BOUNDS);
+ ThrowException(XFA_IDS_INDEX_OUT_OF_BOUNDS);
return;
}
CXFA_Occur nodeOccur(GetOccurNode());
int32_t iMin = nodeOccur.GetMin();
if (iCount - 1 < iMin) {
- ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"min");
+ ThrowException(XFA_IDS_VIOLATE_BOUNDARY, L"min");
return;
}
CXFA_Node* pRemoveInstance = XFA_ScriptInstanceManager_GetItem(this, iIndex);
@@ -3155,7 +3133,7 @@ void CXFA_Node::Script_InstanceManager_AddInstance(
CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if ((argc != 0) && (argc != 1)) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addInstance");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addInstance");
return;
}
FX_BOOL fFlags = TRUE;
@@ -3166,7 +3144,7 @@ void CXFA_Node::Script_InstanceManager_AddInstance(
CXFA_Occur nodeOccur(GetOccurNode());
int32_t iMax = nodeOccur.GetMax();
if (iMax >= 0 && iCount >= iMax) {
- ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"max");
+ ThrowException(XFA_IDS_VIOLATE_BOUNDARY, L"max");
return;
}
CXFA_Node* pNewInstance =
@@ -3192,8 +3170,7 @@ void CXFA_Node::Script_InstanceManager_InsertInstance(
CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if ((argc != 1) && (argc != 2)) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"insertInstance");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"insertInstance");
return;
}
int32_t iIndex = pArguments->GetInt32(0);
@@ -3204,12 +3181,12 @@ void CXFA_Node::Script_InstanceManager_InsertInstance(
CXFA_Occur nodeOccur(GetOccurNode());
int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
if (iIndex < 0 || iIndex > iCount) {
- ThrowScriptErrorMessage(XFA_IDS_INDEX_OUT_OF_BOUNDS);
+ ThrowException(XFA_IDS_INDEX_OUT_OF_BOUNDS);
return;
}
int32_t iMax = nodeOccur.GetMax();
if (iMax >= 0 && iCount >= iMax) {
- ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"max");
+ ThrowException(XFA_IDS_VIOLATE_BOUNDARY, L"max");
return;
}
CXFA_Node* pNewInstance =
@@ -3236,11 +3213,11 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) {
int32_t iMax = nodeOccur.GetMax();
int32_t iMin = nodeOccur.GetMin();
if (iDesired < iMin) {
- ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"min");
+ ThrowException(XFA_IDS_VIOLATE_BOUNDARY, L"min");
return 1;
}
if ((iMax >= 0) && (iDesired > iMax)) {
- ThrowScriptErrorMessage(XFA_IDS_VIOLATE_BOUNDARY, L"max");
+ ThrowException(XFA_IDS_VIOLATE_BOUNDARY, L"max");
return 2;
}
int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
@@ -3297,7 +3274,7 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) {
int32_t CXFA_Node::InstanceManager_MoveInstance(int32_t iTo, int32_t iFrom) {
int32_t iCount = XFA_ScriptInstanceManager_GetCount(this);
if (iFrom > iCount || iTo > iCount - 1) {
- ThrowScriptErrorMessage(XFA_IDS_INDEX_OUT_OF_BOUNDS);
+ ThrowException(XFA_IDS_INDEX_OUT_OF_BOUNDS);
return 1;
}
if (iFrom < 0 || iTo < 0 || iFrom == iTo) {
@@ -3341,7 +3318,7 @@ void CXFA_Node::Script_Desc_Metadata(CFXJSE_Arguments* pArguments) {
if ((argc == 0) || (argc == 1)) {
FXJSE_Value_SetUTF8String(pArguments->GetReturnValue(), "");
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"metadata");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"metadata");
}
}
void CXFA_Node::Script_Form_FormNodes(CFXJSE_Arguments* pArguments) {
@@ -3356,10 +3333,10 @@ void CXFA_Node::Script_Form_FormNodes(CFXJSE_Arguments* pArguments) {
pArguments->GetReturnValue(), (CXFA_Object*)pFormNodes,
m_pDocument->GetScriptContext()->GetJseNormalClass());
} else {
- ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"formNodes");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"formNodes");
}
}
void CXFA_Node::Script_Form_Remerge(CFXJSE_Arguments* pArguments) {
@@ -3367,7 +3344,7 @@ void CXFA_Node::Script_Form_Remerge(CFXJSE_Arguments* pArguments) {
if (argc == 0) {
m_pDocument->DoDataRemerge(TRUE);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"remerge");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"remerge");
}
}
void CXFA_Node::Script_Form_ExecInitialize(CFXJSE_Arguments* pArguments) {
@@ -3379,8 +3356,7 @@ void CXFA_Node::Script_Form_ExecInitialize(CFXJSE_Arguments* pArguments) {
}
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Initialize);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execInitialize");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execInitialize");
}
}
void CXFA_Node::Script_Form_Recalculate(CFXJSE_Arguments* pArguments) {
@@ -3404,7 +3380,7 @@ void CXFA_Node::Script_Form_Recalculate(CFXJSE_Arguments* pArguments) {
} else {
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"recalculate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"recalculate");
}
}
void CXFA_Node::Script_Form_ExecCalculate(CFXJSE_Arguments* pArguments) {
@@ -3416,8 +3392,7 @@ void CXFA_Node::Script_Form_ExecCalculate(CFXJSE_Arguments* pArguments) {
}
pNotify->ExecEventByDeepFirst(this, XFA_EVENT_Calculate);
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execCalculate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execCalculate");
}
}
void CXFA_Node::Script_Form_ExecValidate(CFXJSE_Arguments* pArguments) {
@@ -3432,8 +3407,7 @@ void CXFA_Node::Script_Form_ExecValidate(CFXJSE_Arguments* pArguments) {
((iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE));
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"execValidate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execValidate");
}
}
void CXFA_Node::Script_Form_Checksum(CFXJSE_Value* pValue,
@@ -3468,8 +3442,7 @@ void CXFA_Node::Script_Packet_GetAttribute(CFXJSE_Arguments* pArguments) {
FX_UTF8Encode(wsAttributeValue.c_str(), wsAttributeValue.GetLength())
.AsStringC());
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"getAttribute");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"getAttribute");
}
}
void CXFA_Node::Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments) {
@@ -3485,8 +3458,7 @@ void CXFA_Node::Script_Packet_SetAttribute(CFXJSE_Arguments* pArguments) {
}
FXJSE_Value_SetNull(pArguments->GetReturnValue());
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"setAttribute");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setAttribute");
}
}
void CXFA_Node::Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments) {
@@ -3503,8 +3475,7 @@ void CXFA_Node::Script_Packet_RemoveAttribute(CFXJSE_Arguments* pArguments) {
}
FXJSE_Value_SetNull(pArguments->GetReturnValue());
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"removeAttribute");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"removeAttribute");
}
}
void CXFA_Node::Script_Packet_Content(CFXJSE_Value* pValue,
@@ -3535,120 +3506,119 @@ void CXFA_Node::Script_Source_Next(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"next");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"next");
}
}
void CXFA_Node::Script_Source_CancelBatch(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"cancelBatch");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"cancelBatch");
}
}
void CXFA_Node::Script_Source_First(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"first");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"first");
}
}
void CXFA_Node::Script_Source_UpdateBatch(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"updateBatch");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"updateBatch");
}
}
void CXFA_Node::Script_Source_Previous(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"previous");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"previous");
}
}
void CXFA_Node::Script_Source_IsBOF(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isBOF");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isBOF");
}
}
void CXFA_Node::Script_Source_IsEOF(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isEOF");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"isEOF");
}
}
void CXFA_Node::Script_Source_Cancel(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"cancel");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"cancel");
}
}
void CXFA_Node::Script_Source_Update(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"update");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"update");
}
}
void CXFA_Node::Script_Source_Open(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"open");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"open");
}
}
void CXFA_Node::Script_Source_Delete(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"delete");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"delete");
}
}
void CXFA_Node::Script_Source_AddNew(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addNew");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"addNew");
}
}
void CXFA_Node::Script_Source_Requery(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"requery");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"requery");
}
}
void CXFA_Node::Script_Source_Resync(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resync");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resync");
}
}
void CXFA_Node::Script_Source_Close(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"close");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"close");
}
}
void CXFA_Node::Script_Source_Last(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"last");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"last");
}
}
void CXFA_Node::Script_Source_HasDataChanged(CFXJSE_Arguments* pArguments) {
int32_t argc = pArguments->GetLength();
if (argc == 0) {
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"hasDataChanged");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"hasDataChanged");
}
}
void CXFA_Node::Script_Source_Db(CFXJSE_Value* pValue,
@@ -3677,7 +3647,7 @@ void CXFA_Node::Script_Script_Stateless(CFXJSE_Value* pValue,
FX_BOOL bSetting,
XFA_ATTRIBUTE eAttribute) {
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
FXJSE_Value_SetUTF8String(pValue, FX_UTF8Encode(FX_WSTRC(L"0")).AsStringC());
@@ -5201,10 +5171,10 @@ void CXFA_NodeList::Script_ListClass_Append(CFXJSE_Arguments* pArguments) {
if (pNode) {
Append(pNode);
} else {
- ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"append");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"append");
}
}
void CXFA_NodeList::Script_ListClass_Insert(CFXJSE_Arguments* pArguments) {
@@ -5215,10 +5185,10 @@ void CXFA_NodeList::Script_ListClass_Insert(CFXJSE_Arguments* pArguments) {
if (pNewNode) {
Insert(pNewNode, pBeforeNode);
} else {
- ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"insert");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"insert");
}
}
void CXFA_NodeList::Script_ListClass_Remove(CFXJSE_Arguments* pArguments) {
@@ -5228,10 +5198,10 @@ void CXFA_NodeList::Script_ListClass_Remove(CFXJSE_Arguments* pArguments) {
if (pNode) {
Remove(pNode);
} else {
- ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"remove");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"remove");
}
}
void CXFA_NodeList::Script_ListClass_Item(CFXJSE_Arguments* pArguments) {
@@ -5243,10 +5213,10 @@ void CXFA_NodeList::Script_ListClass_Item(CFXJSE_Arguments* pArguments) {
pArguments->GetReturnValue(),
m_pDocument->GetScriptContext()->GetJSValueFromMap(Item(iIndex)));
} else {
- ThrowScriptErrorMessage(XFA_IDS_INDEX_OUT_OF_BOUNDS);
+ ThrowException(XFA_IDS_INDEX_OUT_OF_BOUNDS);
}
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"item");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"item");
}
}
void CXFA_NodeList::Script_TreelistClass_NamedItem(
@@ -5262,7 +5232,7 @@ void CXFA_NodeList::Script_TreelistClass_NamedItem(
FXJSE_Value_Set(pArguments->GetReturnValue(),
m_pDocument->GetScriptContext()->GetJSValueFromMap(pNode));
} else {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"namedItem");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"namedItem");
}
}
void CXFA_NodeList::Script_ListClass_Length(CFXJSE_Value* pValue,
@@ -5271,7 +5241,7 @@ void CXFA_NodeList::Script_ListClass_Length(CFXJSE_Value* pValue,
if (!bSetting) {
FXJSE_Value_SetInteger(pValue, GetLength());
} else {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
}
}
CXFA_ArrayNodeList::CXFA_ArrayNodeList(CXFA_Document* pDocument)
diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
index 128620c9f8..3b5f681a0f 100644
--- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp
@@ -41,7 +41,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_AppType(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
CFX_WideString wsAppType;
@@ -57,7 +57,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitAppType(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
CFX_WideString wsAppType;
@@ -107,7 +107,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Language(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_LANGUAGE);
+ ThrowException(XFA_IDS_UNABLE_SET_LANGUAGE);
return;
}
CFX_WideString wsLanguage;
@@ -124,7 +124,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_NumPages(
}
CXFA_FFDoc* hDoc = pNotify->GetHDOC();
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_NUMPAGES);
+ ThrowException(XFA_IDS_UNABLE_SET_NUMPAGES);
return;
}
int32_t iNumPages = pNotify->GetDocProvider()->CountPages(hDoc);
@@ -139,7 +139,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Platform(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_PLATFORM);
+ ThrowException(XFA_IDS_UNABLE_SET_PLATFORM);
return;
}
CFX_WideString wsPlatform;
@@ -198,7 +198,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Variation(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_VARIATION);
+ ThrowException(XFA_IDS_UNABLE_SET_VARIATION);
return;
}
CFX_WideString wsVariation;
@@ -214,7 +214,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Version(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_VERSION);
+ ThrowException(XFA_IDS_UNABLE_SET_VERSION);
return;
}
CFX_WideString wsVersion;
@@ -230,7 +230,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitVersion(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_VERSION);
+ ThrowException(XFA_IDS_UNABLE_SET_VERSION);
return;
}
CFX_WideString wsVersion;
@@ -246,7 +246,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Name(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
CFX_WideString wsAppName;
@@ -262,7 +262,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_FoxitName(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_INVAlID_PROP_SET);
+ ThrowException(XFA_IDS_INVAlID_PROP_SET);
return;
}
CFX_WideString wsFoxitAppName;
@@ -276,7 +276,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_GotoURL(
}
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"gotoURL");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"gotoURL");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -298,7 +298,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_OpenList(
}
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"openList");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"openList");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -351,7 +351,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Response(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 4) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"response");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"response");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -424,7 +424,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ResetData(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resetData");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"resetData");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -476,7 +476,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Beep(
}
int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"beep");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"beep");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -496,7 +496,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_SetFocus(
}
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setFocus");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"setFocus");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -555,7 +555,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_MessageBox(
}
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 4) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"messageBox");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"messageBox");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -609,7 +609,7 @@ FX_BOOL CScript_HostPseudoModel::Script_HostPseudoModel_ValidateArgsForMsg(
}
std::unique_ptr<CFXJSE_Value> pValueArg(pArguments->GetValue(iArgIndex));
if (!FXJSE_Value_IsUTF8String(pValueArg.get()) && bIsJsType) {
- ThrowScriptErrorMessage(XFA_IDS_ARGUMENT_MISMATCH);
+ ThrowException(XFA_IDS_ARGUMENT_MISMATCH);
return FALSE;
}
if (FXJSE_Value_IsNull(pValueArg.get())) {
@@ -640,7 +640,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_Print(
}
int32_t iLength = pArguments->GetLength();
if (iLength != 8) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"print");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"print");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -706,7 +706,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ImportData(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"importData");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"importData");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -725,7 +725,7 @@ void CScript_HostPseudoModel::Script_HostPseudoModel_ExportData(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 0 || iLength > 2) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"exportData");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"exportData");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
index 60db201d69..0610da2f5f 100644
--- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
@@ -37,7 +37,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Ready(
return;
}
if (bSetting) {
- ThrowScriptErrorMessage(XFA_IDS_UNABLE_SET_READY);
+ ThrowException(XFA_IDS_UNABLE_SET_READY);
return;
}
int32_t iStatus = pNotify->GetLayoutStatus();
@@ -63,7 +63,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_HWXY(
methodName = L"y";
break;
}
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, methodName);
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, methodName);
return;
}
CXFA_Node* pNode = NULL;
@@ -177,7 +177,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageSpan(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"pageSpan");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"pageSpan");
return;
}
CXFA_Node* pNode = NULL;
@@ -349,7 +349,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageContent(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 3) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"pageContent");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"pageContent");
return;
}
int32_t iIndex = 0;
@@ -432,8 +432,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_AbsPageInBatch(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"absPageInBatch");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"absPageInBatch");
return;
}
CXFA_Node* pNode = NULL;
@@ -467,8 +466,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetInBatch(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 1) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD,
- L"sheetInBatch");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sheetInBatch");
return;
}
CXFA_Node* pNode = NULL;
@@ -523,7 +521,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_PageImp(
} else {
methodName = L"page";
}
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, methodName);
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, methodName);
return;
}
CXFA_Node* pNode = NULL;
diff --git a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
index 6acd67cc7e..6273dc0b45 100644
--- a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp
@@ -28,7 +28,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Verify(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 4) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"verify");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"verify");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -50,7 +50,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Sign(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 3 || iLength > 7) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sign");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sign");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -83,7 +83,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Enumerate(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength != 0) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();
@@ -101,7 +101,7 @@ void CScript_SignaturePseudoModel::Script_SignaturePseudoModel_Clear(
CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 2) {
- ThrowScriptErrorMessage(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clear");
+ ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clear");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetParser()->GetNotify();