diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-01-03 15:45:10 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-03 21:08:58 +0000 |
commit | 3cdcfeb04b5c496199d8c88ebd2402c3db4413ab (patch) | |
tree | abab4708b78aae2bec75ae6d1e9446aec863d159 /xfa/fxfa/parser/xfa_object.h | |
parent | e8f6897c2a80242217da785318b427c82c00ad40 (diff) | |
download | pdfium-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/xfa_object.h')
-rw-r--r-- | xfa/fxfa/parser/xfa_object.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h index c3686ac076..93f4e0145d 100644 --- a/xfa/fxfa/parser/xfa_object.h +++ b/xfa/fxfa/parser/xfa_object.h @@ -90,9 +90,15 @@ class CXFA_Object : public CFXJSE_HostObject { void Script_ObjectClass_ClassName(CFXJSE_Value* pValue, bool bSetting, XFA_ATTRIBUTE eAttribute); - void ThrowException(int32_t iStringID, ...); + + void ThrowInvalidPropertyException() const; + void ThrowArgumentMismatchException() const; + void ThrowIndexOutOfBoundsException() const; + void ThrowParamCountMismatchException(const CFX_WideString& method) const; protected: + void ThrowException(const FX_WCHAR* str, ...) const; + CXFA_Document* const m_pDocument; const XFA_ObjectType m_objectType; const XFA_Element m_elementType; @@ -676,6 +682,11 @@ class CXFA_Node : public CXFA_Object { uint32_t m_dwNameHash; CXFA_Node* m_pAuxNode; XFA_MAPMODULEDATA* m_pMapModuleData; + + private: + void ThrowMissingPropertyException(const CFX_WideString& obj, + const CFX_WideString& prop) const; + void ThrowTooManyOccurancesException(const CFX_WideString& obj) const; }; class CXFA_ThisProxy : public CXFA_Object { |