c# - Exception was unhandled - rethrow exception -
i try rethrow exception, it's not working. 'exception unhandled' error in visual studio.
public keyvalueconfigurationcollection getmyappsetting() { configuration config; configurationfilemap configfile; try { configfile = new configurationfilemap(configurationmanager.openmachineconfiguration().filepath); config = configurationmanager.openmappedmachineconfiguration(configfile); appsettingssection myappsettingsection = (appsettingssection)config.getsection("xxx/appsettings"); myappsettingsection.sectioninformation.allowexedefinition = configurationallowexedefinition.machinetoroaminguser; return myappsettingsection.settings; } catch (exception ex) { logger.fatal("..."); throw; } }
this method belong class library, , call console application. please, me.
thanks.
it working expected.
you catch, rethrow exception - not handling rethrown exception. that's why getting error.
Comments
Post a Comment