MapWinX.Error
A class for storing and retrieving descriptions of
errors encountered while using the MapWinX library. The following functions
are available:
Sample C# Code
//write messages to the error log
string errorMsg = "Error message #1.";
MapWinX.Error.SetErrorMsg(errorMsg);
errorMsg = "Error message #2.";
MapWinX.Error.SetErrorMsg(errorMsg);
//retrieve the last message
string eMsg = MapWinX.Error.GetLastErrorMsg();
//eMsg = "Error message #2."
//remove all messages
MapWinX.Error.ClearErrorLog();
//try to retrieve the last message
eMsg = MapWinX.Error.GetLastErrorMsg();
//eMsg = "No errors were recorded."
Output
Messages are saved to a file named "ErrorLog.txt" located in the same directory as MapWinX.dll.
If more than one error is recorded, the user can view all error messages by opening the file (assuming that
ClearErrorLog( ) has not been called).
While all MapWinX functions use this error class to record messages, it is
possible for the user to use this simple class for the storage and retrieval of their own custom errors.
|
|||||||||
| |||||||||
|
Copyright © 2009 - MapWindow Open Source Team
(/mwxError.php last updated: November 16 2005.) |
|||||||||
Home |
Donate |
Download |
MapWindow GIS Desktop |
MapWinGIS.ocx |
Plug-ins |
Contact |
Lists |
Bugs |
Sample Code |
Documentation
Code Repository | Open Source License | Discussion Forum | Wiki | Join the Team | Site Statistics |
|||||||||