Exception halding in main form