@@ -59,16 +59,9 @@ private void CallbackSaveGeneratorSitemapXml ( object sender, EventArgs e )
59
59
60
60
try
61
61
{
62
- if ( Macroscope . MemoryGuard ( RequiredMegabytes : 256 ) )
63
- {
64
- Cursor . Current = Cursors . WaitCursor ;
65
- SitemapGenerator . WriteSitemapXml ( NewPath : Pathname ) ;
66
- Cursor . Current = Cursors . Default ;
67
- }
68
- }
69
- catch ( MacroscopeInsufficientMemoryException ex )
70
- {
71
- this . DialogueBoxError ( "Error saving Sitemap XML" , ex . Message ) ;
62
+ Cursor . Current = Cursors . WaitCursor ;
63
+ SitemapGenerator . WriteSitemapXml ( NewPath : Pathname ) ;
64
+ Cursor . Current = Cursors . Default ;
72
65
}
73
66
catch ( XmlException ex )
74
67
{
@@ -84,6 +77,10 @@ private void CallbackSaveGeneratorSitemapXml ( object sender, EventArgs e )
84
77
}
85
78
86
79
}
80
+ else
81
+ {
82
+ this . DialogueBoxError ( "Error saving Sitemap XML" , "Could not open file." ) ;
83
+ }
87
84
88
85
Dialog . Dispose ( ) ;
89
86
@@ -115,27 +112,28 @@ private void CallbackSaveGeneratorSitemapXmlPerHost ( object sender, EventArgs e
115
112
116
113
try
117
114
{
118
- if ( Macroscope . MemoryGuard ( RequiredMegabytes : 256 ) )
119
- {
120
- Cursor . Current = Cursors . WaitCursor ;
121
- SitemapGenerator . WriteSitemapXmlPerHost ( NewPath : Pathname ) ;
122
- Cursor . Current = Cursors . Default ;
123
- }
115
+ Cursor . Current = Cursors . WaitCursor ;
116
+ SitemapGenerator . WriteSitemapXmlPerHost ( NewPath : Pathname ) ;
117
+ Cursor . Current = Cursors . Default ;
124
118
}
125
- catch ( MacroscopeInsufficientMemoryException ex )
119
+ catch ( XmlException ex )
126
120
{
127
121
this . DialogueBoxError ( "Error saving Sitemap XML for one or more hosts" , ex . Message ) ;
128
122
}
129
- catch ( XmlException ex )
123
+ catch ( MacroscopeSitemapException ex )
130
124
{
131
- this . DialogueBoxError ( "Error saving Sitemap XML for one or more hosts " , ex . Message ) ;
125
+ this . DialogueBoxError ( "Error saving Sitemap XML" , ex . Message ) ;
132
126
}
133
127
catch ( Exception ex )
134
128
{
135
129
this . DialogueBoxError ( "Error saving Sitemap XML for one or more hosts" , ex . Message ) ;
136
130
}
137
131
138
132
}
133
+ else
134
+ {
135
+ this . DialogueBoxError ( "Error saving Sitemap XML" , "Could not open file." ) ;
136
+ }
139
137
140
138
Dialog . Dispose ( ) ;
141
139
@@ -167,16 +165,9 @@ private void CallbackSaveGeneratorSitemapText ( object sender, EventArgs e )
167
165
168
166
try
169
167
{
170
- if ( Macroscope . MemoryGuard ( RequiredMegabytes : 256 ) )
171
- {
172
- Cursor . Current = Cursors . WaitCursor ;
173
- SitemapGenerator . WriteSitemapText ( NewPath : Pathname ) ;
174
- Cursor . Current = Cursors . Default ;
175
- }
176
- }
177
- catch ( MacroscopeInsufficientMemoryException ex )
178
- {
179
- this . DialogueBoxError ( "Error saving Sitemap Text" , ex . Message ) ;
168
+ Cursor . Current = Cursors . WaitCursor ;
169
+ SitemapGenerator . WriteSitemapText ( NewPath : Pathname ) ;
170
+ Cursor . Current = Cursors . Default ;
180
171
}
181
172
catch ( MacroscopeSitemapException ex )
182
173
{
@@ -219,16 +210,9 @@ private void CallbackSaveGeneratorSitemapTextPerHost ( object sender, EventArgs
219
210
220
211
try
221
212
{
222
- if ( Macroscope . MemoryGuard ( RequiredMegabytes : 256 ) )
223
- {
224
- Cursor . Current = Cursors . WaitCursor ;
225
- SitemapGenerator . WriteSitemapTextPerHost ( NewPath : Pathname ) ;
226
- Cursor . Current = Cursors . Default ;
227
- }
228
- }
229
- catch ( MacroscopeInsufficientMemoryException ex )
230
- {
231
- this . DialogueBoxError ( "Error saving Sitemap Text" , ex . Message ) ;
213
+ Cursor . Current = Cursors . WaitCursor ;
214
+ SitemapGenerator . WriteSitemapTextPerHost ( NewPath : Pathname ) ;
215
+ Cursor . Current = Cursors . Default ;
232
216
}
233
217
catch ( Exception ex )
234
218
{
0 commit comments