design a source type constructor; improve error messages for an invalid call