[Mono-dev] PageThemeFileParser.AddDirective

Chris Toshok toshok at ximian.com
Tue Apr 11 07:42:42 EDT 2006


I actually already committed a patch that works more or less like the
one you've written here.

Chris

On Tue, 2006-04-11 at 00:15 -0700, Andrew Skiba wrote:
> Hi Chris,
> 
> Please review the new patch.
> 
> BTW, what do you think on refactoring ThrowParseException into throw
> ParseException? I mean to create the exception in the helper function,
> but to throw it explicitely?
> 
> Thank you,
> Andrew.
> 
> Index: PageThemeFileParser.cs
> ===================================================================
> --- PageThemeFileParser.cs	(revision 59261)
> +++ PageThemeFileParser.cs	(working copy)
> @@ -51,8 +51,11 @@
>  		}
>  
>  		internal override void AddDirective (string directive,
> Hashtable atts)
> -		{
> -			ThrowParseException ("Unknown directive: " +
> directive);
> +		{
> +			if (string.CompareOrdinal (directive,
> "Register") == 0)
> +				base.AddDirective (directive, atts);
> +			else
> +				ThrowParseException ("Unknown directive:
> " + directive);
>  		}
>  
>  		internal override Type DefaultBaseType {
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list