Properly crash the app if transformation throws, add missing tests.

closes #704