From 2f6a861d2082bff2fe1125445b84cc5f7e11b826 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 6 Jun 2018 17:31:44 +0000 Subject: [xfa] Make class error description better This CL changes the JS error produced by the CFXJSE_Class when a method call returns with error. Instead of outputing something like: JS Error: resolveNode.: we will now get: JS Error: Root.resolveNode: which at least lets us know we're looking at the Root class. Bug: pdfium:1097 Change-Id: I4982109398e290d9ebc2763fcc2421a642c581a5 Reviewed-on: https://pdfium-review.googlesource.com/34090 Reviewed-by: Tom Sepez Commit-Queue: Tom Sepez --- fxjs/cfxjse_class.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fxjs') diff --git a/fxjs/cfxjse_class.cpp b/fxjs/cfxjse_class.cpp index c35ee4aa29..2a2e0da333 100644 --- a/fxjs/cfxjse_class.cpp +++ b/fxjs/cfxjse_class.cpp @@ -95,7 +95,8 @@ void DynPropGetterAdapter_MethodCallback( CJS_Return result = lpClass->dynMethodCall(info, szFxPropName); if (result.HasError()) { - WideString err = JSFormatErrorString(*szPropName, "", result.Error()); + WideString err = + JSFormatErrorString(lpClass->name, *szPropName, result.Error()); v8::MaybeLocal str = v8::String::NewFromUtf8( info.GetIsolate(), ByteString::FromUnicode(err).c_str(), v8::NewStringType::kNormal); -- cgit v1.2.3