To handle errors with the HsvResourceManager object, take the following steps.
To handle errors:
Call Initialize to specify the Financial Management tier for which you want to use resources. You must call Initialize before calling the other HsvResourceManager methods.
Pass the XML string and the HRESULT to GetFormattedError or GetFormattedErrorWithLineFeed.
Pass the HRESULT to GetResourceStringFromHR.
All of these methods return error messages that you can display to users. However, GetFormattedError and GetFormattedErrorWithLineFeed also return more technical information that may help debug an issue.
These methods take language IDs. If Financial Management has been localized into a language, then error messages for that language will be available, otherwise error messages will be returned in Financial Management’s default language. You can enumerate the languages for which localized error message strings are available with GetAvailableLanguages. |