summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/resource.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-03-02 12:18:50 -0800
committerTom Sepez <tsepez@chromium.org>2015-03-02 12:18:50 -0800
commitb720d0a14601f1496ef15297bc46d401f5a2a890 (patch)
treed19c5604c1528646d992ffcd1beabe8279d5d4b3 /fpdfsdk/include/javascript/resource.h
parent944ccad72d028ed5e37f53c5c8c0888866905bc3 (diff)
downloadpdfium-b720d0a14601f1496ef15297bc46d401f5a2a890.tar.xz
Return error information from pdfium to JS.
This implements the previously unimplemented JS_Error() function. Along the way: - fix some IWYU when the include order in global.cpp was perturbed. - remove some uses of JS_ErrorString, to increase transparency. - use vp.IsSetting() in place of !vp.IsGetting() for clarity. - specify an error string on several error return paths. - add an error string for writing readonly properties. - rename an error string constant to reflect the actual message. - replace calls to variadic Format() with a function doing string appends. - remove unused JS_GetClassName() R=thestig@chromium.org Review URL: https://codereview.chromium.org/963193003
Diffstat (limited to 'fpdfsdk/include/javascript/resource.h')
-rw-r--r--fpdfsdk/include/javascript/resource.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/fpdfsdk/include/javascript/resource.h b/fpdfsdk/include/javascript/resource.h
index 058b5fd893..8f0a25061e 100644
--- a/fpdfsdk/include/javascript/resource.h
+++ b/fpdfsdk/include/javascript/resource.h
@@ -26,8 +26,12 @@ class CJS_Context;
#define IDS_STRING_RUN 25630
#define IDS_STRING_JSPRINT1 25632
#define IDS_STRING_JSPRINT2 25633
-#define IDS_JSPARAM_INCORRECT 25635
+#define IDS_STRING_JSNOGLOBAL 25635
+#define IDS_STRING_JSREADONLY 25636
CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id);
+CFX_WideString JSFormatErrorString(const char* class_name,
+ const char* property_name,
+ const CFX_WideString& details);
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_RESOURCE_H_