catch errors from tree.toCSS()

closes #32