ModulePropertiesPage.OnException(Exception) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Displays the exception message.
protected:
virtual void OnException(Exception ^ ex);
protected virtual void OnException (Exception ex);
abstract member OnException : Exception -> unit
override this.OnException : Exception -> unit
Protected Overridable Sub OnException (ex As Exception)
Parameters
- ex
- Exception
The caught exception.
Examples
The following example calls the LoadPreferences method when an exception is caught.
protected override void LoadPreferences(
PreferencesStore store) {
try {
base.LoadPreferences(store);
_myCnfgBool = store.GetValue(CS.myCnfgBool, false);
int i = store.GetValue(CS.zCnt, 1638);
Trace.WriteLine("store.GetValue(zCnt, 1638); = "
+ i.ToString());
} catch (Exception ex) {
OnException(ex);
}
}