   use: (context) ->
     result = @func.call context
     unless result?
-      throw new Error "Function for symbol #{@key} returned #{result}"
+      throw new SVGTilerError "Function for symbol #{@key} returned #{result}"
     ## Render Preact virtual dom elements (e.g. from JSX notation) to SVG now,
     ## for better duplicate detection.
     result = renderPreact result

                  svg: fs.readFileSync filename,
                         encoding: getSetting settings, 'svgEncoding'
              else
                throw new SVGTilerException "Unrecognized extension in filename '#{data}' for symbol '#{key}'"
        else
          data = svg: data
      new StaticSymbol key, {...data, settings}

class Symbol extends HasSettings
  @parse: (key, data, settings) ->
    unless data?
      throw new SVGTilerError "Attempt to create symbol '#{key}' without data"
    else if typeof data == 'function'
      new DynamicSymbol key, data, settings
    else if data.function?
