From 3cdcfeb04b5c496199d8c88ebd2402c3db4413ab Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 3 Jan 2017 15:45:10 -0500 Subject: Create individual exception methods. This CL removes the LoadString method from CPDFXFA_Context and, instead, creates individual exception methods for each of the loaded strings and calls as needed. BUG=pdfium:549 Change-Id: I1d975f01f13f45a885946a9952f24b13387dc3e4 Reviewed-on: https://pdfium-review.googlesource.com/2135 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- xfa/fxfa/parser/cscript_signaturepseudomodel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/parser/cscript_signaturepseudomodel.cpp') diff --git a/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp b/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp index 391f3be381..e5874a61cc 100644 --- a/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp +++ b/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp @@ -26,7 +26,7 @@ CScript_SignaturePseudoModel::~CScript_SignaturePseudoModel() {} void CScript_SignaturePseudoModel::Verify(CFXJSE_Arguments* pArguments) { int32_t iLength = pArguments->GetLength(); if (iLength < 1 || iLength > 4) { - ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"verify"); + ThrowParamCountMismatchException(L"verify"); return; } @@ -38,7 +38,7 @@ void CScript_SignaturePseudoModel::Verify(CFXJSE_Arguments* pArguments) { void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) { int32_t iLength = pArguments->GetLength(); if (iLength < 3 || iLength > 7) { - ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"sign"); + ThrowParamCountMismatchException(L"sign"); return; } @@ -49,7 +49,7 @@ void CScript_SignaturePseudoModel::Sign(CFXJSE_Arguments* pArguments) { void CScript_SignaturePseudoModel::Enumerate(CFXJSE_Arguments* pArguments) { if (pArguments->GetLength() != 0) { - ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"enumerate"); + ThrowParamCountMismatchException(L"enumerate"); return; } return; @@ -58,7 +58,7 @@ void CScript_SignaturePseudoModel::Enumerate(CFXJSE_Arguments* pArguments) { void CScript_SignaturePseudoModel::Clear(CFXJSE_Arguments* pArguments) { int32_t iLength = pArguments->GetLength(); if (iLength < 1 || iLength > 2) { - ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"clear"); + ThrowParamCountMismatchException(L"clear"); return; } -- cgit v1.2.3