Simplify error handling on unknown directive