Internal Exceptions

Can anyone think of a good reason to make an exception class internal?  I mean, surely the whole point of raising typed exceptions is so that people can process the exact exception that they’re looking at in the debugger.  It’s not like the debugger prints up “nearest public type”.  You can always make the constructor internal if you’re really afraid of marauding bands of developers intent on breaking your code.

And the offender that’s annoyed me so much?  System.Management.Automation.ParameterBindingValidationException.  Thanks, powershell.

Technorati Tags:

Published by

Julian Birch

Full time dad, does a bit of coding on the side.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s