Re: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-13 Thread Andrew Zhang
Hi Vladimir, Where exceptions should be thrown is a big question in this thread. Native code or Java code or mixed? Shall we avoid throwing all exceptions in Harmony native code? If all exceptions are thrown in java code, there is no need to involve any other I18N utilities (i.e. log4cXXX).

Re: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-13 Thread Paulex Yang
Mikhail Loenko wrote: I suggest that we: 1) avoid throwing exceptions from native code I have no strong feelings yet which is better, to throw Exception in native codes directly or always to return error codes to Java. There are different styles in Java and C programming on error handling, C

Re: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-13 Thread Vladimir Gorr
On 7/13/06, Andrew Zhang [EMAIL PROTECTED] wrote: Hi Vladimir, Where exceptions should be thrown is a big question in this thread. Native code or Java code or mixed? Yes, I'm aware about this. However I'd prefer to have other subject for this thread :-). Thanks, Vladimir. Shall we avoid

Re: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-13 Thread Mikhail Loenko
Minor note: I havn't insisted that we *always* return error code rather than throw Exception, instead I suggest that we avoid throwing exceptions from native whenever possible. I thought that native calls that don't throw exceptions might be optimized by JIT. But it's only a guess, I leave it

Re: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-13 Thread Andrew Zhang
On 7/13/06, Mikhail Loenko [EMAIL PROTECTED] wrote: Minor note: I havn't insisted that we *always* return error code rather than throw Exception, AFAIK, luni and nio modules always throw exception rather than return error code. instead I suggest that we avoid throwing exceptions from

I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-12 Thread Jimmy, Jing Lv
Hi: I'd like to raise the topic on I18N of native code. As discussed about patch-815, we found there are exceptions thrown by native code with un-internationalized error message. To resolve this problem, there may be two solutions: 1) make native code return error code instead of throw

Re: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-12 Thread Andrew Zhang
On 7/13/06, Jimmy, Jing Lv [EMAIL PROTECTED] wrote: Hi: I'd like to raise the topic on I18N of native code. As discussed about patch-815, we found there are exceptions thrown by native code with un-internationalized error message. To resolve this problem, there may be two solutions:

Re: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-12 Thread Mikhail Loenko
I suggest that we: 1) avoid throwing exceptions from native code 2) don't parse exception messages in the code (use subclasses of exceptions when necessary) Thanks, Mikhail 2006/7/13, Andrew Zhang [EMAIL PROTECTED]: On 7/13/06, Jimmy, Jing Lv [EMAIL PROTECTED] wrote: Hi: I'd like to

Re: I18N on native (was:Re: [jira] Commented: (HARMONY-815) [classlib][nio] Refine implConfigureBlocking(boolean) method of DatagramChannel and SocketChannel.)

2006-07-12 Thread Vladimir Gorr
On 7/13/06, Jimmy, Jing Lv [EMAIL PROTECTED] wrote: Hi: I'd like to raise the topic on I18N of native code. As discussed about patch-815, we found there are exceptions thrown by native code with un-internationalized error message. To resolve this problem, there may be two solutions: 1)