1 // Copyright 2017 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef FXJS_JS_RESOURCES_H_ 8 #define FXJS_JS_RESOURCES_H_ 9 10 #include "core/fxcrt/widestring.h" 11 12 enum class JSMessage { 13 kAlert = 1, 14 kParamError, 15 kInvalidInputError, 16 kParamTooLongError, 17 kParseDateError, 18 kRangeBetweenError, 19 kRangeGreaterError, 20 kRangeLessError, 21 kNotSupportedError, 22 kBusyError, 23 kDuplicateEventError, 24 kSecondParamNotDateError, 25 kSecondParamInvalidDateError, 26 kGlobalNotFoundError, 27 kReadOnlyError, 28 kTypeError, 29 kValueError, 30 kPermissionError, 31 kBadObjectError, 32 kObjectTypeError, 33 kUnknownProperty, 34 kInvalidSetError, 35 kUserGestureRequiredError, 36 kTooManyOccurrences, 37 kUnknownMethod, 38 kWouldBeCyclic, 39 }; 40 41 WideString JSGetStringFromID(JSMessage msg); 42 WideString JSFormatErrorString(const char* class_name, 43 const char* property_name, 44 const WideString& details); 45 46 #endif // FXJS_JS_RESOURCES_H_ 47