cancel
Showing results for 
Search instead for 
Did you mean: 

Junk character in ResourceException

Former Member
0 Kudos
51

Hi,

I have a problem that non-English characters cannot be displayed correctly in stack trace of a ResourceException.

In our code we throw ResourceException for example when the user cannot logon:

String logon_err_msg = "\u4e2d\u6587\u9519\u8bef\u4fe1\u606f";//Chinese characters

throw new ResourceException(rid, logon_err_msg, exception);

Then in KM, when this exception is thrown, I can see localized characters in Exception Message, but they will be displayed as many question marks ("???") when I click Call Stack

Exception Class: class com.sap.netweaver.bc.rf.common.exception.ResourceException

Exception Message: 中文错误信息

Call Stack

com.sap.netweaver.bc.rf.common.exception.ResourceException: ??????

at

Is there any way to show error message correctly in stack?

Thanks,

Ray

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can easily reproduce this problem by constructing a ResourceException with a double-byte string:

String loc_err_msg = "\u4e2d\u6587\u9519\u8bef\u4fe1\u606f";//Chinese characters

try {

int i = 2 / 0;

} catch (Exception e) {

ResourceException re = new ResourceException(null, loc_err_msg, e);

re.printStackTrace();

}

Former Member
0 Kudos

This should be a known limitation. Close it.