summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-01-03 15:45:10 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-01-03 21:08:58 +0000
commit3cdcfeb04b5c496199d8c88ebd2402c3db4413ab (patch)
treeabab4708b78aae2bec75ae6d1e9446aec863d159 /xfa/fxfa/parser/cscript_signaturepseudomodel.cpp
parente8f6897c2a80242217da785318b427c82c00ad40 (diff)
downloadpdfium-3cdcfeb04b5c496199d8c88ebd2402c3db4413ab.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cscript_signaturepseudomodel.cpp')
-rw-r--r--xfa/fxfa/parser/cscript_signaturepseudomodel.cpp8
1 files changed, 4 insertions, 4 deletions
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;
}