CODECUBE VENTURES

Directory Services Blow

Not really, they're actually really great, especially in an organization that uses Active Directory as extensively as Tiburon. Unfortunately for us (the developers), the error messages that are thrown by this API are absolutely worthless, same goes for the System.Management stuff (WMI). I mean, is it really that hard to output the parameters that were passed into the function that threw the exception!? It makes it damn near impossible to debug when an application that runs as a scheduled task fails with

System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb). at System.DirectoryServices.ResultPropertyValueCollection.get_Item(Int32 index) at LDAPEmpInfoUpdate.LDAPEmpInfoUpdate.CollectEmployeeLDAPInfo() at LDAPEmpInfoUpdate.LDAPEmpInfoUpdate.Main(String[] args)

Seriously folks, it's as easy as this:

throw new NotImplementedException(
string.Format("This value you passed in, {0}, messed up our code",
argYourValue) );

Latest post: Digging Up the First Version of CodeCube

See more in the archives