@@ -252,7 +252,7 @@ public bool CompileProject()
252
252
{
253
253
if ( ! HasVBEExtensions )
254
254
{
255
- throw new ArgumentException ( "This TypeLib does not represent a VBE project, so we cannot compile it" ) ;
255
+ throw new InvalidOperationException ( "This TypeLib does not represent a VBE project, so we cannot compile it" ) ;
256
256
}
257
257
258
258
try
@@ -266,7 +266,7 @@ public bool CompileProject()
266
266
if ( e . HResult != ( int ) KnownComHResults . E_VBA_COMPILEERROR )
267
267
{
268
268
// this is for debug purposes, to see if the compiler ever returns other errors on failure
269
- throw new ArgumentException ( "Unrecognised VBE compiler error: \n " + e . ToString ( ) ) ;
269
+ throw new InvalidOperationException ( "Unrecognised VBE compiler error: \n " + e . ToString ( ) ) ;
270
270
}
271
271
#endif
272
272
return false ;
@@ -283,7 +283,7 @@ public string ConditionalCompilationArgumentsRaw
283
283
{
284
284
if ( ! HasVBEExtensions )
285
285
{
286
- throw new ArgumentException ( "This ITypeLib is not hosted by the VBE, so does not support ConditionalCompilationArguments" ) ;
286
+ throw new InvalidOperationException ( "This ITypeLib is not hosted by the VBE, so does not support ConditionalCompilationArguments" ) ;
287
287
}
288
288
289
289
return target_IVBEProject . GetConditionalCompilationArgs ( ) ;
@@ -293,7 +293,7 @@ public string ConditionalCompilationArgumentsRaw
293
293
{
294
294
if ( ! HasVBEExtensions )
295
295
{
296
- throw new ArgumentException ( "This ITypeLib is not hosted by the VBE, so does not support ConditionalCompilationArguments" ) ;
296
+ throw new InvalidOperationException ( "This ITypeLib is not hosted by the VBE, so does not support ConditionalCompilationArguments" ) ;
297
297
}
298
298
299
299
target_IVBEProject . SetConditionalCompilationArgs ( value ) ;
@@ -310,7 +310,7 @@ public Dictionary<string, short> ConditionalCompilationArguments
310
310
{
311
311
if ( ! HasVBEExtensions )
312
312
{
313
- throw new ArgumentException ( "This ITypeLib is not hosted by the VBE, so does not support ConditionalCompilationArguments" ) ;
313
+ throw new InvalidOperationException ( "This ITypeLib is not hosted by the VBE, so does not support ConditionalCompilationArguments" ) ;
314
314
}
315
315
316
316
string args = target_IVBEProject . GetConditionalCompilationArgs ( ) ;
@@ -330,7 +330,7 @@ public Dictionary<string, short> ConditionalCompilationArguments
330
330
{
331
331
if ( ! HasVBEExtensions )
332
332
{
333
- throw new ArgumentException ( "This ITypeLib is not hosted by the VBE, so does not support ConditionalCompilationArguments" ) ;
333
+ throw new InvalidOperationException ( "This ITypeLib is not hosted by the VBE, so does not support ConditionalCompilationArguments" ) ;
334
334
}
335
335
336
336
var rawArgsString = string . Join ( " : " , value . Select ( x => x . Key + " = " + x . Value ) ) ;
0 commit comments