Displaying error messages

In the CommonPoint application system you can handle exceptions in the ordinary way using the C++ catch keyword. If while handling an exception you want to display an error message to the user, you can use GetFormattedText(), a static member function of TExceptionFormatter:

      catch (const TMyException& exception) {
          TStandardText message;
      
          // currentLocale is for internationalization - specifies the language to use
          TExceptionFormatter::GetFormattedText(exception, currentLocale, message);
      
          // display message to the user...
      }

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker