         Builder = Field
       when 'picklistValues'
         Builder = PicklistValue
-      else throw 'unknown tag type'
+      else throw new Error 'unknown tag type'
     thing = new Builder()
     tag.getchildren().forEach (child) ->
       thing.set child.tag, child.text, child

        @fullName = value
      when 'default'
        @default = value is 'true'
      else throw 'unknown field on picklist value object'

module.exports = factory

        @picklist = new Picklist tag
      when 'visibleLines'
        @visibleLines = parseInt value, 10
      else throw new Error 'unknown field on field object'

class Type
  constructor: (@value) ->
