A
andreister
Hi there!
We are currently going to externalize exceptions in our application. It
is a server that has both thin and thick clients.
Generally, I see the three following possibilities for the server:
1. Request client locale within client calls and return
fully localized message in case of exception
2. Return not text but exception code so the client
will look up for the translated string in local bundles
3. Return not text but a key and parameters and then
the same as in 2.
Each one has its own pros and cons, namely:
1. Pros:
* do not need to update clients if
a new exception is introduced
or an exising one is updated
Cons:
* need to change dependent method
signatures to accept the locale param.
* forces the server to host resources for
all supported locales.
2. Pros:
* server does not care about client locales
* no need to change web services call
signatures and all dependent calls
to accept locale param
Cons:
* need to update thick clients if
a new message is introduced
3. Pros:
* the same as in 2 - BUT is a more flexible
since allows passing parameters so an error
message is more informative
Cons:
* the same as in 2.
I wonder if anybody could suggest any other approach or comment the
mentioned or point out some resources where I could find more info.
TIA,
Andrew
We are currently going to externalize exceptions in our application. It
is a server that has both thin and thick clients.
Generally, I see the three following possibilities for the server:
1. Request client locale within client calls and return
fully localized message in case of exception
2. Return not text but exception code so the client
will look up for the translated string in local bundles
3. Return not text but a key and parameters and then
the same as in 2.
Each one has its own pros and cons, namely:
1. Pros:
* do not need to update clients if
a new exception is introduced
or an exising one is updated
Cons:
* need to change dependent method
signatures to accept the locale param.
* forces the server to host resources for
all supported locales.
2. Pros:
* server does not care about client locales
* no need to change web services call
signatures and all dependent calls
to accept locale param
Cons:
* need to update thick clients if
a new message is introduced
3. Pros:
* the same as in 2 - BUT is a more flexible
since allows passing parameters so an error
message is more informative
Cons:
* the same as in 2.
I wonder if anybody could suggest any other approach or comment the
mentioned or point out some resources where I could find more info.
TIA,
Andrew