trchandra
28th May 2003, 00:14
Hi,
Is there any way to get the error messages defined for error code returned in predefined variable "e"? There are bunch of detailed error messages defined for error codes in manual, but I am looking at tools function to retreive those messages by passing value of "e".

thanks for your help
regards

NPRao
30th May 2003, 03:14
Ravi,

I couldnt yet figure the exact place or functions where it is handled.

I am guessing the #define DB.SKIP.DUPL 111 etc might be present in the tools includes - ttstperror or ttstperrors.

There is also a session - ttadv0160m000 - Tools Texts - with text types as common text, display server text, Bshell text.

Also found another tools library-

Library ttstperrors
--------------------------------------------------------------------------------
This library contains functions to translate an error code from the TG package
to its original mnemonic, which is better human readable.
--------------------------------------------------------------------------------
ttstperrors.errortostring
string ttstperrors.errortostring( long error )


This function converts the given error number from any other function into
its mnemonic, so for example ttstperrors.ErrorToString(WMS.NO.MEMORY) will
return "WMS.NO.MEMORY". It should be used when making user feedback or
logging messages to files when an erroroneous return from such a function
needs user response etc. For example:
retval = SomeFunction(...)
if retval <> 0 then
message(sprintf$("Unexpected error from SomeFunction(...): %s",
ttstperrors.ErrorToString(retval)))

Parameters:
error the error to be converted

Return value:
string the mnemonic of the given error, or the text: <id> <error> ???
in case a value is given which is unknown
-------------------------------------------------------------------------------

trchandra
30th May 2003, 03:33
Prashant,
This function is not returning the error message defined for standard errors. I think we can create some include to have switch case statement to get the appropriate message defined for each error code.

regards