Thinking about it perhaps the question is when is it good practice to
return an error code vs throw an exception?
I had intended to throw an exception string that would be localised by
my nsIConsole Listener. Though I have just noticed the message attribute
is read only, so is there even a way to replace or cancel an
nsIScriptError message?
N
Neil Stansbury wrote:
I had intended to store all my JS component error codes as string const
so they could be easily referenced in an external properties file.
However I see IDL doesn't support string consts.
I could store them as longs but this is far less intuitive and means
even I'll need to go and look them up before I know what they mean!
How does everyone else localise error codes in their components?
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom