Improve error handling and reporting in the LED pattern parser