add type to the constructor for easily inverting types in an enumeration

I am looking to export an object keyed by all of my error types.  This change would make that possible.