Provides a handler to process syntax error state
Returns a handler to process error. If the function returns nullptr the handling does not run and exception occurred