1 // Copyright 2017 PDFium Authors. All rights reserved. 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 kTooManyOccurances, 37 kUnknownMethod, 38 }; 39 40 WideString JSGetStringFromID(JSMessage msg); 41 WideString JSFormatErrorString(const char* class_name, 42 const char* property_name, 43 const WideString& details); 44 45 #endif // FXJS_JS_RESOURCES_H_ 46