public static void Unregister(Type t) { try { COMHelper.RegasmUnregisterLocalService(t, new Guid(AppId)); } catch (Exception ex) { Console.WriteLine(ex.Message); // Log the error throw ex; // Re-throw the exception } }