sheik Mohamed

sheik Mohamed

  • NA
  • 6
  • 603

Localization with Exception:

Jun 17 2016 1:05 AM
I have an application with supporting localization stuff, currently its supporting only English and German language, i have a goal like "We should not translate the exception message and Log messages" because its for developer debugging purposes. So currently am struck in the following situation.
 
Situation: How do we handle the Logging + Exception + Show the exception in User interface, when we show the message to UI it is always translatable one. but logging should not.
 
Flow: Button -> Method1 -> Method2 -> Method3 -> Method4, am getting the exception in Method4, so its propogate to Method3,2,1.  Finally method 1 show this exception message to UI (Untranslated message).
 
Option1: We can translate the message from method4 and pass it low level and display it to UI (Translated text).
 
Difficulties: If we go with option1, its fine but method3 doing the logging the exception, which should not be translatable in this case, how do we handle this situation????
 
Should we need is: When this work flow if we do the logging in between we should not translate, and show to UI as translated text. 
 
 
 

Answers (1)