Dear guys!!

Again stuck!!

So here it is: I have an app that needs to communicate with 2 Serial ports. And the info (COMa,COMb) comes from a config file, which COM port is for what purpose. The reason is to make a universal app, so depending on PC to PC, it will run simply.

What I did:

1) there is a conf file which already keeps the info (as I know).
2) the app loads the info and initiates a connection [].
3) The p continues to do its work.

Now, it has a config window that it uses for config settings.

Where I'm stuck:

1) If there is no conf file/if there is no info in file (say fresh install) then it fails to load at all [means i need some exception handling to pass it away.]
2) If the COM ports are not available in real, then the app is getting hang, and there I again need another exception handling to pass it away.

Last Note: I prefer to pass it away as then I can enter into the config window for config and that will eventually generate the conf file.