Security Console - 7

Step 4: Adding Custom Error Text

Last updated on: 5/1/2013 11:45 AM 
Created on: 11/2/2016 2:22 PM 

One of the easiest interfaces to implement in the framework is the ISCErrorReporterExtension. This class provides methods to the framework that allow for customizable error messages to be displayed to the user. The implementation begins by subclassing our Demo applet from the ISCErrorReporterExtension base class.

The method that needs to be implemented is the GetPostText() method which takes two parameters. The first parameter is the integer representing the post code that needs a textual description. The second parameter is a QString that needs to receive the proper text describing the nature of the error represented by the post code. The only trick to keep in mind is that post codes can not conflict with post codes found in other applets as they all share the same system. The framework currently defines the base value to use for your applet's errors in ERROR_REPORTER_NEXT_VALUE. Our demo applet error codes need to be an enumeration starting with this base. That is file not found can not be 7, but must be ERROR_REPORTER_NEXT_VALUE + 7. Because all applets currently share the same reporter system, once the framework finds an applet that handles 7 that text is used. Likewise, our demo applet may be called to look up a post code that is not ours. If we don't handle the post code, GetPostText() needs to false. If we did provide the proper text description, return true. All other error reporting actions are now handled by the framework.

Now that the main method of the ISCErrorReporterExtension has been added, our demo applet can now display appropriate error messages in the framework's error handling routines.


Developer's Historical Persepctive Why A Platform Standards The User Experience


ISCApplet ISCTaskListExtension ISCConfigPanelExtension ISCErrorReporterExtension ISCLogConnector/ISCLogEntry ISCCertificateStoreExtension ISCSystemTrayExtension ISCAppletWindowExtension ISCSecureObjectExtension

Applet Building Steps

Step 1: Create The Applet Step 2: Adding Action Items Step 3: Adding Configuration Panels Step 4: Adding Custom Error Text Step 5: Startup/Shutdown Step 6: Adding Main Window Support Step 7: Adding Obejct Window Support