Use PreprocessorException instead of AssertionError in preprocessor

Don't use asserts.