summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cfxjse_formcalc_context.cpp11
-rw-r--r--fxjs/xfa/cjx_object.cpp2
2 files changed, 6 insertions, 7 deletions
diff --git a/fxjs/cfxjse_formcalc_context.cpp b/fxjs/cfxjse_formcalc_context.cpp
index cf42fb26c7..4201059c06 100644
--- a/fxjs/cfxjse_formcalc_context.cpp
+++ b/fxjs/cfxjse_formcalc_context.cpp
@@ -6199,9 +6199,8 @@ void CFXJSE_FormCalcContext::GlobalPropertyGetter(CFXJSE_Value* pValue) {
void CFXJSE_FormCalcContext::ThrowNoDefaultPropertyException(
const ByteStringView& name) const {
- // TODO(tsepez): check usage of c_str() below.
- ThrowException(L"%.16S doesn't have a default property.",
- name.unterminated_c_str());
+ ThrowException(L"%ls doesn't have a default property.",
+ WideString::FromUTF8(name).c_str());
}
void CFXJSE_FormCalcContext::ThrowCompilerErrorException() const {
@@ -6220,14 +6219,14 @@ void CFXJSE_FormCalcContext::ThrowPropertyNotInObjectException(
const WideString& name,
const WideString& exp) const {
ThrowException(
- L"An attempt was made to reference property '%.16s' of a non-object "
- L"in SOM expression %.16s.",
+ L"An attempt was made to reference property '%ls' of a non-object "
+ L"in SOM expression %ls.",
name.c_str(), exp.c_str());
}
void CFXJSE_FormCalcContext::ThrowParamCountMismatchException(
const WideString& method) const {
- ThrowException(L"Incorrect number of parameters calling method '%.16s'.",
+ ThrowException(L"Incorrect number of parameters calling method '%ls'.",
method.c_str());
}
diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp
index 6984c3a998..23e754d4b7 100644
--- a/fxjs/xfa/cjx_object.cpp
+++ b/fxjs/xfa/cjx_object.cpp
@@ -193,7 +193,7 @@ void CJX_Object::ThrowIndexOutOfBoundsException() const {
void CJX_Object::ThrowParamCountMismatchException(
const WideString& method) const {
- ThrowException(L"Incorrect number of parameters calling method '%.16s'.",
+ ThrowException(L"Incorrect number of parameters calling method '%ls'.",
method.c_str());
}