on 2007 Dec 24 10:32 AM
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
Request clarification before answering.
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();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
30 | |
10 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.