incubator-etch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tohru Ohzono -X (tohzono)" <tohz...@cisco.com>
Subject Etch Csharp binding CultureInfo issue?
Date Tue, 13 Jan 2009 07:42:57 GMT
Hi all,

I think there is a problem with etch C# binding in Japanease
Environment( or some other country).

In the "ReadSocket()" method of the "Etch.Util.TcpTransport.cs",
The following cause a problem in Japanease Environment.

//---------------------------------//
if (e.Message == null)
  throw e;
if (e.Message.Contains("connection was aborted"))
  return;
if (e.Message.Contains("blocking operation"))
  return;
if (e.Message.Contains("socket closed"))
  return;
if (e.Message.Contains("read operation failed"))
  return;
  
throw e;
//---------------------------------//


The "e.Message" returns Localized Message if a .Net Framework Language
Pack is installed.
(Japanease Language pack is installed, e.Message returns a message in
Japanease)
So, any exceptions are thrown to the outside.


I know one workaround.
It will work well, 
if the line "thisThread.CurrentCulture = CultureInfo.InvariantCulture;"
is added
at the top of "Run()" mehod of the "Etch.Util.Runner.cs".
(Instead, we become unable to get localized exception message from this
thread.
But, it will be acceptable for Japanease developers.)


Any other good ideas?


Regards,
Tohru

Mime
View raw message