Throw error when trying to discretize operators on unbounded domains.

This closes #1073.